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'. [snip] Celejar -- mailmin.sourceforge.net - remote access via secure (OpenPGP) email ssuds.sourceforge.net - A Simple Sudoku Solver and Generator -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]