Mike Miller wrote: > On Tue, 14 Feb 2006, Scot Jenkins wrote: > >> I write all my shell scripts in /bin/sh since that makes them the most >> portable. It's the one shell that's guaranteed to exist on all *NIX >> systems. > > That's a good point. Is it *always* in that exact directory? It > certainly is on Solaris, AIX and Linux. Having the path right definitely > makes it easier when dealing with inexperienced users. Yep, as required by IEEE Std 1003.1 ("POSIX.1" -- the Portable Operating System Interface). For other shells/languages, the recommended usage is #!/usr/bin/env bash The "env" command runs a command with a [possibly] modified environment. The above usage does not modify the environment; it merely takes advantage of a "value-added" feature: env finds the command in the PATH. Eric