in reply to Re: somewhat OT: Subroutines within if statements
in thread Subroutines within if statements
Giving a non-zero exit code (as die() does) on error makes combining scripts in shell scripts / one-liners a lot easier:
And yes I do this a lot.my-shell$ check-this-config-file.pl && then-stop-this-server && then-d +o-a-lot-of-stuff.pl && then-start-that-server
|
|---|