in reply to Shebang Inside the coding ?
#!/usr/bin/perl print "hi\n";
call that prog "hi" and try to chmod +x on it and run it. It will work fine. (of course assuming the path to perl is correct) Now add a blank line above #!. Try to run this again. What do you see? Also try to add a space before shebang. what happens now?
Vim is not looking to see if the shebang is on the first line or not. That's why it is coloring it.
In short, that line is just a comment if it is in the middle of the code. -SK
Update: Please see ysth's reply on how shebang can have other stuff before it.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Shebang Inside the coding ?
by ysth (Canon) on Jan 16, 2006 at 08:09 UTC | |
by sk (Curate) on Jan 16, 2006 at 16:38 UTC | |
Re^2: Shebang Inside the coding ?
by vennirajan (Friar) on Jan 16, 2006 at 06:11 UTC |