3. Compile and test the results:
A. Empty command line variables.
B. Open a command line window and change the directory (CD) to the location of the SLUtil.exe file (... \debug\slutil.exe)
C. Open the Library shell folder next to the Command Line
This article mainly introduces the shell script implementation to monitor the running state of the specified process, this article directly gives the script code, the need for friends can refer to the following
In the previous blog, once wrote the
command options files Some variables related to the arguments passed to the shell: the number of $# command line arguments $? The return value of the calling command $$ the process number of the current process $! The process number of the last
The command interpreter Shell is an application that is most closely related to users, and users use the system primarily through the shell. After each login to the system, a shell that interacts with the user is started, and the shell gives a
Found that three symbols are useful when writing scripts. One is the pipe command "|", one is executing the command "&" in parallel, and the other is "&&"
The so-called pipe, acting as a function of the connection between the front and back two
This article records my common or useful system level commands under Linux system, including hardware and software view, modify command, CPU, memory, hard disk, network, system management, etc. However, this article does not intend to introduce
Speaking of function calls, I believe that we will not be unfamiliar, however, for beginners shell of me, the shell function call Way is a little let me not too accustomed to, I have gone a lot of detours, because the transfer parameters when a very
Environment:
SSH server:192.168.100.29 server.example.com
SSH client:192.168.100.30 client.example.com
Create secret key authentication through root user to implement Shell script management, distribution, deployment
First, the client side
Functions: functionProgram Programming: Code ReuseModular programmingStructured programmingThe code of an independent function as a whole, and a name for it; a named code snippet, which is a function;Note: The code snippet that defines the function
Prepare 3 Machines1.linux-node1 ip:10.89.3.108 (Springboard machine)2.weblamp ip:10.89.3.1003.weblnmp ip:10.89.3.101The 3 system environments are as follows:[Email protected] ~]$ cat/etc/redhat-release CentOS release 6.8 (Final)1) First do SSH key
First set a small goal, first proficient in the shell say! --OLD boyUseShelldeveloping a Springboard function script caseexample 17_6: Developing an Enterprise-class Shell springboard machine case. Requiring a user to log on to a springboard machine
Move cursor shortcut keysCtrl+f move forward one characterCtrl+b Move backward one characterCTRL + A moves to the beginning of the current homeCtrl+e move to the end of the current lineAlt+f move forward one wordAlt+b Move backward One wordCtrl+l
First, the meaning of variable $#,[email protected],$0,$1,$2,$*,$$,$ in Linux:Script tests can be used to differentiate the specific roles and usages of these variables.The script is as follows:# vim Variable#!/bin/shecho "number:$#" echo "Scname:$0"
First we need to understand the content and format of the script
The first line must be shebang (interpreter path), shebang must occupy the absolute beginning
In the shell script, except for Shebang, the contents of the line beginning
echo Display in shell script with color display, echo display with color, need to use parameter-EThe format is as follows:Copy the code code as follows:Echo-e "\033[word background color; text color m string \033[0m"For example:Copy the code code as
In the previous blog, we introduced some of the features of Shell programming, namely command aliases, command history, shortcut keys, command completion, command line expansion, command execution results, escape characters, wildcards, IO
Homework One: Organize your blog with awk, variables, operators, if multiple branchesJob Two: awk text processing1, print the UID within the scope of 30~40 user name[Email protected] ~]# awk-f: ' $3>=30 && $32. Print the line number and user name of
===========================================================================if define a PATH variable in a statement the path that raised the command bug where path change occurs problem
Original script file: INotify +rsync Live Sharing
Frequently used file test operators-ongoing updates
- e -- exist
File exists is True
- F -- file
File exists and is true for normal files
- D -- Directory
File exists and is directory-True
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service