Assume there is command1 && command2.
command1 && command2
In this case command2 will be executed if and only if command1 returned zero exit status.
command2
command1
Similarly, command1 || command2 can be used to run command2 only if command1 returned a nonzero exit status.
command1 || command2
; is just a command separator. Thus command2 will be executed whatever command1 returned.
;
Linux工具快速教程arrow-up-right
Last updated 5 years ago