linux fragmented knowledge

1, Linux is "|" pipe character usage

An output command, the next command as a parameter

Way: command1 | command2

Linux provided by the pipe symbol "|" separated the two commands, command pipe character to the left of the output will be used as input pipe symbol to the right of command. Continuous use of pipelines means that the first command will output as the second command input, the output of the second command will enter as the third command, and so on

 

2, Linux's "&" symbol usage

command1 && command2 [&& command3 ...]

Use && connection command, and implementing logical functions. 

Only && left of the command returns true (command returns the value of $? == 0) && right of the command will be executed. 

As long as there is a command returns false (command returns the value of $? == 1), the latter command will not be executed.

 

Guess you like

Origin www.cnblogs.com/Luv-GEM/p/11540736.html