command in Shell replaces $ (...) The difference and connection with the post-reference ' ... '

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

Shell: Monitor the running state of the process and automatically restart the process

#!/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=

Shell Scripts---grep, awk, sed tools

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

Use of shell scripts---if condition judgment

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,

Jenkins Add application plugin for post-build shell cmd

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

Linux single-File installer--shell+tar implementation self-extracting script

1. Edit a decompression script first ins.sh1 #!/bin/bash2 preline=103 line= ' wc-l $0|awk ' {print $} '4 line= ' expr $line-$preline '5 tail-n $line $ |tar xz-c.6 #do something ...7 Exit 0891011The first 5 lines are used for decompression, finally

The latest Linux operations must be 22 shell programming surface questions Wonderful explanation

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,

Bash/shell Programming Learning (3)

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

4 ways to execute shell scripts in Linux summary

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

Greedy and non-greedy matches in the shell

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

Shell Command Collection

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

Shell built-in command test single-bracket difference

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

Shell simulates concurrent execution

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

Using shell script to write SSH directly modify the password of the target server and SSH application

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

Oh-my-zsh Configure your zsh to increase the ultimate choice of shell-driven lattice

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

Shell:nohup Daemon Process

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

Hudson Execute shell script (Hudson boot tomcat Invalid issue)

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

A simple shell script-----Implement a simple configuration of the virtual machine lab environment

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

Shell file Operators (> >> >>>)

> 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

Questions about the logon shell cannot successfully enter the user name password

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

Total Pages: 541 1 .... 107 108 109 110 111 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.