On Thu, Jul 24, 2014 at 2:23 PM, Wolfgang Maier <wolfgang.ma...@biologie.uni-freiburg.de> wrote: > On 24.07.2014 14:19, Chris “Kwpolska” Warrick wrote: >> >> >>>>> python test.py >>>>> if [ $? = 0 ]; then >>>>> python second.py >>>>> fi >>>>> >>>>> as your shell script. >>>> >>>> >>>> >>>> The [ ] and = should be doubled. >>> >>> >>> >>> ?? why that ? >> >> >> Double brackets can do more: >> >> >> http://stackoverflow.com/questions/2188199/how-to-use-double-or-single-bracket-parentheses-curly-braces >> > > But more is not required here. What am I missing ?
It’s recommended to switch to the [[ syntax anyways, some people consider [ deprecated. Also, [ is actually /bin/[ while [[ lives in your shell (and is therefore faster). About the equals sign, == is the preferred syntax, and = is also considered deprecated (zsh explicitly says so, bash says “only for POSIX compatibility”. -- Chris “Kwpolska” Warrick <http://chriswarrick.com/> PGP: 5EAAEA16 stop html mail | always bottom-post | only UTF-8 makes sense _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor