I've so far only tested this on OS X, and have mostly used it with the `-t` mode to have it notify me (via "say") when ssh succeeds on a CloudFormation spawned AWS instance.
What's the difference between this and the bash '&&' operator? Except for the timebomb flag, I don't really see any difference. Please correct me if I got this wrong.
The '&&' operator, as in which ruby && echo 'found it!', triggers the second command, if the exit code of the first one is 0.
Also good to note, the '||' operator triggers the second command only if the exit code of the first one is different than 0. As in which ruby123456 || echo 'could not find it!'.
13 comments
[ 3.0 ms ] story [ 47.6 ms ] threadIt defaults to the until behavior because it's most common.
The '&&' operator, as in which ruby && echo 'found it!', triggers the second command, if the exit code of the first one is 0.
Also good to note, the '||' operator triggers the second command only if the exit code of the first one is different than 0. As in which ruby123456 || echo 'could not find it!'.
EDIT: typo.
edit: someone else just posted about watch[1], never knew that existed before today. You learn something new every day :D
[1] https://news.ycombinator.com/item?id=6888640