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?
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?