<a href="http://en.wikipedia.org/wiki/Shebang_%28Unix%29">http://en.wikipedia.org/wiki/Shebang_%28Unix%29</a><br><br><blockquote>when it occurs as the first two characters on the first line of a text file. In this case, the <a href="http://en.wikipedia.org/wiki/Loader_%28computing%29" title="Loader (computing)">program loader</a> in <a href="http://en.wikipedia.org/wiki/Unix-like" title="Unix-like">Unix-like</a> operating systems parses the rest of the first line as an <a href="http://en.wikipedia.org/wiki/Interpreter_directive" title="Interpreter directive">interpreter directive</a>
and invokes the program specified after the character sequence with any
command line options specified as parameters. The name of the file
being executed is passed as the final argument.<br></blockquote><br>As you can see this is not something an interpreter is supposed to do, the responsability is delegated to the OS's program loader. You could emulate this under Windows, but I suppose you would be using cygwin or something similar.<br>
<br><div class="gmail_quote">On Tue, Apr 17, 2012 at 11:13 AM, Vinay Sajip <span dir="ltr"><<a href="mailto:vinay_sajip@yahoo.co.uk">vinay_sajip@yahoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Marius Ghita <mhitza <at> <a href="http://gmail.com" target="_blank">gmail.com</a>> writes:<br>
<br>
> And thats expected given than the shebang is *nix specific.<br>
<br>
</div>Perhaps not unexpected, but not necessary either. I may be wrong, but it seems<br>
reasonable to assume there's a common code base for the Haskell Platform for<br>
Linux and Windows versions. Presumably there's code for the parser to the skip<br>
shebang line on Linux - there's no reason why it couldn't do the same on<br>
Windows. As it is, it's just an unhelpful impediment to having cross-platform<br>
scripts (unless there's a good reason for it - I couldn't think of one).<br>
<br>
Coincidentally, I am working on functionality which brings shebang line<br>
processing to Windows, primarily for Python scripts but it also works with other<br>
scripting languages (like Perl). That's not why I posted this, though - I was<br>
just given a set of scripts and want to use them on Windows without changing<br>
them just for this.<br>
<div class="HOEnZb"><div class="h5"><br>
Regards,<br>
<br>
Vinay Sajip<br>
<br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Google+: <a href="https://plus.google.com/111881868112036203454" target="_blank">https://plus.google.com/111881868112036203454</a><br><br>