[X-Unix] Hiding apps from the command line
Stroller
MacMonster at myrealbox.com
Fri Mar 26 09:04:34 PST 2004
On Mar 26, 2004, at 12:15 pm, Eugene Lee wrote:
>
> : #! /bin/sh
>
> No spaces here, it should be "#!/bin/sh" (without the quotes).
It's probably more elegant to use #!/bin/bash at the beginning of your
scripts, as we don't actually have a Bourne shell on our Macs. In
additional to its superset of commands `bash` does, I believe, behave
slightly differently from traditional `sh`; if invoked as `sh` Bash
_should_ behave as `sh`, however I am not aware that this has been
demonstrated. [1]
Consequently beginning scripts with `#!/bin/bash` is acknowledging that
you haven't tested it with the last-seen-in-the-70s Bourne shell (which
is undoubtedly still available on some systems, and of which I believe
there are feature-compatible variants still maintained).
Stroller.
[1] I lost an argument about this here before, so that's how I know.
More information about the X-Unix
mailing list