&& executes the next command only if the current command is successful
echo 'def' && sdaasf && echo 'abs'
will print:
def
bash: sdaasf: command not found
while ; does not have this resrtiction
echo 'def' ; sdaasf ; echo 'abs'
will print:
def
bash: sdaasf: command not found
echo 'def' && sdaasf && echo 'abs'
will print:
def
bash: sdaasf: command not found
while ; does not have this resrtiction
echo 'def' ; sdaasf ; echo 'abs'
will print:
def
bash: sdaasf: command not found
abs
No comments:
Post a Comment