Donncha O Caoimh
donncha.ocaoimh at tradesignals.com
Wed Nov 7 11:53:34 GMT 2001
I seem to remember that if you create a shell script in a Windows editor
and attempt to execute it in Unix the extra line feeds that Windows
throws in wrecks the magic line at the top of the file. James should
edit that file in a Unix editor and rewrite the first line - that should
fix things. 'Course, if he gave the error message that was printed when
he ran the script it might help too!
Vincent Cunniffe wrote:
> James.Chambers at irishlife.ie wrote:
> > if I create a text file in notepad on windows, is it possible to make it
> > executable on linux, I tried chmod +x and changing the owner of the file. No
> > matter what I did it wouldn't execute for me.
> The output from a compiler would have this automatically, but you have to
> add your own when writing things such as text scriptfiles.
> The following is a valid script :
> echo "Hello world!"
> The 'magic' is the first two characters, #!, followed by a valid interpreter
> which will be handed the file to execute. You can have anything here,
> including a unix shell, a PHP parser, a java engine, or whatever.
More information about the ILUG