I. Command substitutionA. in Bash, $ () and ' (anti-quote) are used for command substitution.B. command substitution is similar to variable substitution, which is used to reorganize the command line, complete the command line in quotation marks, and
#!/bin/Shmaxrstcount=5; Proctogo=/mnt/hgfs/code/test/Show#count isThe counter of test started Timescount=0Sys_reboot () {echo"system is going to reboot"; Reboot;} Main_loop () { while : Do######################################### prostillrunning=
The grep command in the Grep:linux system is a powerful text-search tool that uses regular expressions to search for text and print matching lines. grep is a lookup filtering tool in which regular expressions find strings that conform to patterns in
Testing and judging of shell scripts1. TestingGrammar:[operator condition] = = Test operator condition1) test file-level directoryType of File:F, FileLs-l # #只查看字段的第一个字符, file "-"D, CatalogueLs-ldL, Link fileLs-lC, character deviceLs-l/dev/ttyB,
For details see: http://stackoverflow.com/questions/11160363/execute-shell-script-after-post-build-in-jenkinsOn a Linux server, when the build is complete, you need to manipulate the content, the files, and if you can use shell commands to execute
1. Batch creation of files with random strings multiple methodsThis time, the $random variable is used.The Create command is as follows:echo $RANDOM |md5sum|tr "[0-9]" "[A-z]" |cut-c 3-8Output a random number via echo, then encrypt it by MD5,
The next section continues,1. Reading input from the keyboard#!/bin/bashread-p ' Please input something: ' Inputecho ' your input: ' $inputOperating effect:./read1.shplease Input Something:123your input:1232. While Loop and Case
There are several ways to bash a shell script, and now make a summary. Suppose we write a good shell script with the file name hello.sh, the file location in the/data/shell directory and have execute permissions.Method One: Switch to the directory
Give me a chestnut: V=jfedu.shiyiwen.comecho ${v%.*}A% is a non-greedy match, which matches the shortest result. % a non-greedy match from right to left, what does it match? Matches characters that have. *. Then of course it matches to. com and
The shell is the interface between the user and the Linux operating system.CCat Zdd Browse the contents of a ZDD fileCat Zdd1 Zdd2 Browsing the contents of multiple filesCat-n ZDD Browse the contents of a file Zdd and display line numbersCD back to
1, the single-brace test command to separate the word of the variable, when the value of the variable contains whitespace, the variable is enclosed in quotation marks, while the double-brace Test command does not separate the word from the
Reference: http://www.51testing.com/html/28/116228-238978.htmlhttp://blog.chinaunix.net/uid-27571599-id-3473078.html in bash, use background tasks to achieve multi-process tasks. In uncontrolled mode, regardless of the number of tasks, all
1. In the build environment, the server's password is often modified to ensure security and can be scripted with the shell.Using SSH to directly modify the password of the other server can be implemented with the SSH username @ login IP followed
Sorry, this post has been postponed, people are lazy ... Look at this shiny headline and forgive me!Why is this article classified under a Mac? The first question, which we will explain later.What is ZSH? A second question ...Should you touch a
If you want to start a shell script in a terminal session, and then have the script run in background mode until it finishes, you can use the Nohup command, even if you quit the terminal session. The feeling of Nohup is to initialize a process to a
When using Hudson's execute SH script, if the SH script is a background process, such as TOMCAT services. If you use the default configuration of Hudson, you will find that the SH process has a start-up process, but will not be resident in the
Personally wrote the shell script only to find that this thing is very convenient, when you want to put some trivial, detailed small instructions to complete a single time, the script is undoubtedly the best choice, convenient, fast, the key is
> If the file does not exist, as above, if the file exists, clear the file first, then fill in the file with the data>> If the file does not exist, a new file is created and the data is sent to the file, and if the file exists, the data is added
Recently found in the group feedback, login layer can not successfully enter the user name password situation, roughly looked at, a little summary:I encountered the login can not successfully enter the user name password situation there are two, one
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