www.digitalmars.com         C & C++   DMDScript  

D - windows shebang ?

reply SeanG <sgarratt gmail.com> writes:
On http://www.d-programming-language.org/rdmd.html Andrei states:


latter assuming that rdmd can be found in your path.)


it a batch file, and in a .d file yielded no results.

rdmd is in the path. Win 7. ran .bat and .d files both from windows shell and
a cmd prompt.

dont really need it, but I know Andrei is usually pretty precise about these
kind of things - and it peaked my curiosity. maybe in MSDOS it worked ?
Jan 05 2012
next sibling parent reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Thursday, 5 January 2012 at 22:43:23 UTC, SeanG wrote:
 dont really need it, but I know Andrei is usually pretty 
 precise about these
 kind of things - and it peaked my curiosity. maybe in MSDOS it 
 worked ?
No, MS-DOS used extensions like Windows. Shebang makes sense if you try to run a D program from a bash-like shell, e.g. using MSys or CygWin. It'd make sense to look for rdmd in the PATH (as opposed to passing an absolute path), assuming that'll work at all. Replacing cat with type seems odd, though, since using a shebang-aware shell implies that other Unix-like tools are available, like cat.
Jan 05 2012
parent SeanG <sgarratt gmail.com> writes:
thanks for your response.

I assumed he meant natively not using a 'nix shell.

will repost as you suggested to digitalmars.D
Jan 05 2012
prev sibling parent "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
You may want to repost this to digitalmars.D. This newsgroup is 
deprecated, and few people follow it.
Jan 05 2012