Shift parameter moves left oneSHIFT + number, the parameter moves to the left n bits at a timeIt can be used to determine the number of parameters behind the program.Returns an error when the shift value is emptyUse read to assign input values to
Implementation of dependency processing and parallel compilation of Docker image under shellRecently, when making a series of Docker image compilation scripts, I thought we could not speed up the parallel compilation, checked the data, and finally
DescriptionI believe that in the work, many friends in the use of shell scripts encountered ${},%, #等这些字符的使用, and occasionally they will be dizzy, and then I use the following example to let everyone very well remember the Shell ${}, # #和 percent
Sort order:-F: ignore character case-N: Compare numeric Size-T: specify delimiter -K: Specify to compare field ordinals after delimited-u: duplicate rows, only once Sort by the second row of values:$ sort-k2n SORT.TXTCCC 8aaa 11yyy 12
8.6 Pipe break and job control:1, cat 1.txt |wc-l; Cat 1.txt |grep ' aaa '2. Ctrl Z pauses a task3. Jobs View background tasks4, Bg[id] The task to the backstage5. Fg[id] Transfer the task to the front desk6. Add & Drop the command back to the
For example, the need to test a batch of IP in the work is still blocked, you need to write a simple script ping test.We need two machines,Virtual Host: centos6.7 systemLocal linux:centos6.5"Virtual Host"Remote to the host, add IP (Learn the script,
The Linux Shell "(())" Double parenthesis operator uses theAt the beginning of learning Inux shell scripting, for its arithmetic and logical operations. It is estimated that many friends feel more difficult to accept. When using the special variable
UI Items Delete useless strings in the "UIL" file:The script needs to develop a TXT file for the UIL file directory location & useless string, such as deleting a useless string from the Haier directory:./delete_uil_string.sh.
A string interception of Linux is useful. There are eight ways.Suppose there is a variable var=http://www.linuxidc.com/123.htm 1 # Intercept, delete the left character, and leave the right character. Echo ${var#*//}where Var is the variable name
1 PrefaceThe shell can deal with subsystems, and subsystems can provide many interfaces for external settings and read information.Below is the kconfig configuration of the shell, the use of the shell, and how to create a new shell command.It can be
The implementation is as shown in the following:[Email protected] shell]# bash zong.sh================== Caesar encryption and decryption ==============================1) input string for Caesar encryption (the input string can only be letters,
The issue occurs in the background:There is a project through the IP to get the city needs of attribution, I was directly through the IP Attribution query interface of Sina to obtain. I'm using a shell script callresult=$ (curl-s '
(a) Title:Accept a user input to determine if the input can be used as a variableConditions that can be used as variables(1) Uppercase and lowercase letters can be(2) A number may be in the middle of the letter, but cannot begin with a number(3)
Usage: seq [options] ... TailOr: seq [options] ... First Count MantissaOr: seq [options] ... First number increment MantissaTwo ways to cycle from 1 to 100 (bash other shells have not tried)For x in ' seq 1 ';d o echo $x;d oneFor x in {1..100};d o
calculate the front of a specific directory Ten a large fileIn a given directory, want to know which large files exist, take the top 10, by file size ranking(1) , using awk to achieve#!/bin/bashPath=/root/shellFind $path-type F | awk ' {Var=$0"Ls-l"
One, parenthesis, parentheses ()1, single parenthesis ()① Command group . The commands in parentheses will be executed in a new sub-shell sequence, so the variables in parentheses cannot be used by the rest of the script. Multiple commands in
#!/bin/bashwhile getopts I:VH Namedo case $name in i) Opt=1 echo $OPTARG;; V) opt=2 Echo 2;; h) opt=3 echo 3;; *) echo "Invalid arg-$OPTARG";; EsacdoneThe getopts is used in the following form:
1.1 What is a shell? in computer science, Shell commonly known as Shell , used to distinguish from Kernel ( nucleus ), refers to the "User interface " software ( command parser ). It is similar to DOS command and later cmd.exe. It receives the
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