... die("...") if system("/path/to/cmd1.sh")!=0; die("...") if system("/path/to/interactive-cmd-exp.pl")!=0; ...