One, parenthesis, round brackets () 1, single parenthesis ()
The 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
awk IntroductionReport Generator, formatted text outputThe processing mechanism is similar to the SED command, which comes with loop processing, reads a line and then automatically reads the next line to processThe identity of the SED command
Special symbols
* Any character
? Any one character
Comment characters
Indicates that the order does not take effect, and explains
\ de-Semantic characters
| Pipe breaks, several commands related
1, terminal (termimal) = TTY (teletypewriter, fax printer), the role is to provide a command of the input and output environment, under Linux using a combination of keys ctrl+alt+t Open is the terminal, you can think terminal and TTY is synonymous;2,
One, hive command line 1, hive support some of the commands
Command Description
quit Use quit or exit to leave the interactive shell.
Set Key=value Use the To set value of particular configuration variable. One thing to note here's if you
Directory:I. While loop and until loopTwo. Loop control statement continue break shiftThree. Special usageI. While loop and until loop
1.while CycleWhile CONDITION; DoLoop bodyDoneCONDITION: cyclic control condition; Before entering the loop,
The content of this article is very miscellaneous, but it is not difficult to understand, do not map by example.First introduce several characters commonly used characters:1 * matches any of any characters2? Match an arbitrary character3 # comment
Once the backup SQL file is generated in auto-package, monitor the operation!#Crontab Time # variablesfile_dir=/data/mysql_bak/ #备份存放路径DATE = ' Date +%y_%m_%d ' #获取当前系统时间FILE_NAME = " Mysqldata_bak_$date.tar.gz "#最终保存的数据库备份文件名FILE =${file_dir}
Linux Learning Chat (i)--Shell Basic operations and commands(Reproduced please attach this article link--linhxx)1, #!/bin/shPlaced at the beginning of the program, expressed in/bin/sh way to parse.2. Variables1) variable assignment varname= ' xxx ',
Blog content is about the shell script number of the arrangement, more basic, mainly sharing logic, there are better ideas to share in the review of common progress.The script implementation prompts the user to enter 3 integers sequentially, and the
Shell Special Symbol Cut commandShell Special Symbols* *任意个任意字符* ?任意一个字符* #注释字符* \脱义字符* |管道符Command cutcut is used to intercept a field in the form of: #cut –d ' separator character ' [-cf]n,n is a number.Options:- D is followed by a delimiter, and
Tag: Date command displays case false cmd put who bar inputShell Exercise: Write a script to do the following: Enter a number, and then run the corresponding command. The command is displayed as follows: *cmd meau** 1--date 2--ls 3--who 4--pwd When
In the previous section we learned about the Shell's echo command, which we'll learn from the Shell's other output command printf.The printf command mimics the printf () program in the C library.printf is defined more by the POSIX standard, so a
the shell reads files by line There are many ways to do this, and here are three ways to write:Writing one:#!/bin/bash# Description: # while loop read Line operation # Author: Lone Boat Dot # version:1.0#创建时间: -one- Geneva:
1. Use the Dos2unix command to process scripts developed under WindowsThe following scenarios for placing scripts under Windows for editing under Linux are as follows:[[email protected] ~]# cat-v nginx.sh #!/bin/bash^Ma=1 n^Msum=0 ^ M while ((a 0
Sshpass This software is for SSH to provide a password to useYum Install sshpass- yBulk distribution of script content#!/bin/bash. /etc/rc.d/init.d/functions# Create key\rm ~/.ssh/id_rsa*-FSsh-keygen-t rsa-f ~/.ssh/id_rsa-n ""-Q# Distributing
The string is compared to the integer type, because the ABCD and other characters are not 0123 when the program tries to turn to binary, the conversion cannot be completed, so the operation used for the numeric comparison cannot be used for the
Functions in the shell1. First case:[[email protected] shell]# sh fun1.sh the first par is bthe second par is athe third par is 2the script name is fun1.shthe number of par is 5[[email protected] shell]# cat fun1.sh #!/bin/bashfunction inp(){
Shell script ping test (Code instance), shellpingShell script ping Test
Principle: use shell scripts to execute a ping command.
1) The destination_ip variable is the IP address of the target host. 2) The-c1 parameter after ping indicates 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.