Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux &&

; is just a command seperator so if you have 'command1; command2' then
'command2' will always be run after attempting to run 'command1'
However if you have 'command1 && command2' then
'command2' will only be run if 'command1' returned zero exit status

Example:
$> [[ "a" = "b" ]] && echo ok 

$> [[ "a" = "b" ]]; echo ok 
ok
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #linux
ADD COMMENT
Topic
Name
6+1 =