Re: [Hampshire] Gnome Launcher with script

Top Page

Reply to this message
Author: Simon Reap
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Gnome Launcher with script
Aaron West wrote:
> Graham Bleach wrote:
>> 2008/6/13 Aaron West <linux@???>:
>>
>>> #/bin/bash!
>>>
>>
>> That should read:
>>
>> #!/bin/bash
>>
>> You can get away with your current incorrect line in bash, as it
>> assumes that scripts without a proper shebang line are to be parsed by
>> bash.
> Seriously I would of thought you were quite right that I could get
> away with it but after changing that just to keep it tidy and correct
> it worked so then I thought no way surely not so changed it back and
> it failed.
>


I seem to remember that the old Bourne shell we knew and loved would
treat such a line (or any malformed line starting with a hash) as saying
"run under csh", which would have caused your script to terminate more
quickly than you expect (since "read" doesn't work in csh). Old habits
die hard, so I still make sure that my scripts don't start with a hash
comment - if I want a comment on the first line, I use ":" carefully.

Simon
--