Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

PATHEXT for Bash?

Name: Anonymous 2006-05-25 7:16

Is there any kind of PATHEXT for Bash?

PATHEXT, a feature of CMD.EXE and the Windows shell API, is like PATH for file extensions. If, for example, you set it to ".EXE;.PL", and launch "lol", for each directory in PATH, it will try to find "lol" as is, then "lol.EXE", then "lol.PL". Windows will start the first file found.

Start means it'll look for the default shell action and do it. If it's a Perl file, it'll run it through Perl. If it's an executable, it'll directly execute it. This avoids having to do the #!/lol_my_folder_is_different/perl shit in scripts) and allows you to launch anything associated with any command. I don't expect this to be possible under Lunix because you have no global file associations, but would at least there be a PATHEXT equivalent?

Name: Anonymous 2006-05-25 8:09

There is no file association because there is no file extension for programs. With "Lunix" (haha your teh funny) you can execute a text file as a program, you can't do this on non *nix systems (not that I use this crappy method but you started the flamewar anyway...)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List