On Mon, May 07, 2007 at 08:27:45PM -0400, Celejar wrote: > On Mon, 7 May 2007 16:10:24 -0700 > Andrew Sackville-West <[EMAIL PROTECTED]> wrote: > > > On Mon, May 07, 2007 at 11:04:02PM +0200, Sjoerd Hiemstra wrote: > > > Manon Metten wrote: > > > > BTW: what's the first line "#!/bin/bash" in the script for? > > > > > > It is not really necessary, but it has some advantages. > > > The 'file' command will recognize the file as a script, there are > > > certain other programs (emacs?) that will treat it as such.... and > > > here is where my limited knowledge ends. > > > I'm sure others could say more about it. > > > > > > > it ensures script compatibility across different systems. There is no > > guarantee that the default shell on a system will be bash, so this > > specifies to the shell interpreter to use bash instead of the default > > shell. It could just as easily be some other shell: csh, ksh, plain > > sh, or whatever. Its likely not necessary for something as simple as > > Minor nit: in Debian, '/bin/sh' is a symlink to bash; I don't know what > it is on other systems. So IIUC, when you write '#!/bin/sh', you aren't > really specifying a shell, but are rather saying 'use the standard > shell'.
heh. minor nit back. from man bash If bash is invoked with the name sh, it tries to mimic the startup behavior of historical versions of sh as closely as possible, while conforming to the POSIX standard as well. so it does in fact make some (don't ask me what) difference in the shell. ;-P A
signature.asc
Description: Digital signature