On Thu, Jul 24, 2014 at 2:01 PM, Wolfgang Maier <[email protected]> wrote: > Try something like this (assuming bash): > > python test.py > if [ $? = 0 ]; then > python second.py > fi > > as your shell script.
The [ ] and = should be doubled. But all this is not needed, all you need is: python test.py && python second.py However, you need to explicitly stack all the commands you want to execute this way — so, if there are more things, `set -e` might also be of use. (you would need an even uglier tree for `if`s.) -- Chris “Kwpolska” Warrick <http://chriswarrick.com/> PGP: 5EAAEA16 stop html mail | always bottom-post | only UTF-8 makes sense _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
