Use linux's sh command shell command language interpreter
This article mainly introduces the use of linux sh command shell command language interpreter, the article is very detailed, has a certain reference value, interested friends must read it!
The sh command is a shell command language interpreter that executes commands to read from standard input or from a file. Through the user input commands, and the kernel to communicate!
Bourne Again Shell (bash) is a Shell developed by the Free Software Foundation (GNU), which is a default Shell in Linux systems. Bash is not only compatible with Bourne Shell, but also inherits the advantages of C Shell, Korn Shell and so on.
Syntax format: sh [parameters]
Common parameters:
Reference example
Trace script debug shell script, can print out each line of command executed and the current status:
[root@linuxcool] # sh-x test.sh + DEFINE=30 + cat / var/log/secure + awk'/ Failed/ {+ + ip [$(NF-3)]} END {for (i in ip) print I "=" ip [I]}'+ + cat / root/satools/black.txt + for i in '`cat / root/satools/b lack.txt`' + + echo 121.42.0.16 + 1427 + + awk-F ='{print $1}'+ IP=121.42.0.16 + + echo 121.42.0. 1601427 + + awk-F ='{print $2}'+ NUM=1427 +'['1427-gt 30']'+ grep 121.42.0.16 / etc/hosts.deny +'[1-gt 0']'+ echo sshd:121.42.0.16 + echo vsftpd:121.42.0.16 + for i in '`cat / root/satools/b lack.txt`' + + echo 121.42.0.72276 + + awk-F ='{print $1}'+ IP=121.42.0.72 + + awk-F ='{print $1}' Print $2}'+ + echo 121.42.0.72276 + NUM=276 +'['276-gt 30']'+ grep 121.42.0.72 / etc/hosts.deny +'[1-gt 0']'+ echo sshd:121.42.0.72 + echo vsftpd:121.42.0.72 is all the contents of the shell command language interpreter using linux's sh command Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!