View mode: basic / threaded / horizontal-split · Log in · Help
January 05, 2012
windows shebang ?
On http://www.d-programming-language.org/rdmd.html Andrei states:

(Under Windows replace cat with type and #!/usr/bin/rdmd with #!rdmd, the
latter assuming that rdmd can be found in your path.)

what is the #!rdmd about ? I know of no windows shebang syntax, and trying it
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 ?
January 05, 2012
Re: windows shebang ?
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.
January 05, 2012
Re: windows shebang ?
You may want to repost this to digitalmars.D. This newsgroup is 
deprecated, and few people follow it.
January 05, 2012
Re: windows shebang ?
thanks for your response.

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

will repost as you suggested to digitalmars.D
Top | Discussion index | About this forum | D home