View Single Post
coredumb's Avatar
Posts: 92 | Thanked: 74 times | Joined on Nov 2008 @ Indonesia
#5
Originally Posted by Estel View Post
its &&

so:

command1 && command2

But, shell scripts doesn't bite, and sometimes && may not work for You - i.e. in cases, where finishing command1 is required for command2 to function properly. Of course, You may do some command1 && wait 2 && command2, but it's starting to look like too much hassle/ugly code.
cmiiw, command2 executed only if command1 finish with exit code 0
 

The Following 3 Users Say Thank You to coredumb For This Useful Post: