On Tue, Aug 5, 2014 at 6:49 PM, Achim Gratz <strom...@nexgo.de> wrote: > Ole Tange writes: > >> In the next release $SHELL is ignored if GNU Parallel can figure out >> which shell it is started from, so if started from tcsh, 'tcsh -c' >> will be used to start new commands. > > I humbly suggest you don't do that or at least make it optional. It > would make using a fancy interactive shell but running commands with > something much more lightweight, for instance via > > SHELL=/bin/dash ENV=.shinit parallel … > > needlessly cumbersome.
The reason is for people that make scripts for others to run. E.g: #!/usr/bin/tcsh parallel 'setenv FOO bar; echo $FOO {}' ::: foo This example uses 'setenv' which does not exist in bash. If your login $SHELL is bash, then running that script will fail, because GNU Parallel 20140722 will use $SHELL. The script coder's login $SHELL is probably tcsh, so the script will work for him. This goes against principle of least astonishment: We expect the same script to behave the same way - no matter which login $SHELL we call it from. This also shows you how to force GNU Parallel to use /bin/dash: Either make a script (starting with #!/bin/dash) or use: dash -c 'parallel ....' /Ole