<?xml version="1.0" encoding="windows-1252"?>
<node id="523401" title="Re: Shebang Inside the coding ?" created="2006-01-16 00:57:55" updated="2006-01-15 19:57:55">
<type id="11">
note</type>
<author id="387687">
sk</author>
<data>
<field name="doctext">
Shebangs is meaningful only on the first 2 bytes in the first line of a file. &lt;p&gt;

&lt;c&gt;
#!/usr/bin/perl

print "hi\n";
&lt;/c&gt;&lt;p&gt;

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 &lt;c&gt;#!&lt;/c&gt;. Try to run this again. What do you see? Also try to add a space before shebang. what happens now? &lt;p&gt; 

Vim is not looking to see if the shebang is on the first line or not. That's why it is coloring it.&lt;p&gt; In short, that line is just a comment if it is in the middle of the code.

-SK&lt;p&gt;

&lt;b&gt;Update&lt;/b&gt;: Please see [ysth]'s reply on how shebang can have other stuff before it. &lt;p&gt;</field>
<field name="root_node">
523394</field>
<field name="parent_node">
523394</field>
</data>
</node>
