Answers for "linux &&"

1

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
Posted by: Guest on June-14-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language