Re: /usr/bin/env bash
Joerg Schilling <[email protected]> Wed, 18 Aug 2004 15:30:06 +0200 (CEST)
| Newsgroups | gmane.linux.lsb.discuss |
|---|---|
| Message-ID | <[email protected]> |
>From: Mark Brown <[email protected]> >This still requires a specification of exec() that includes it knowing >what to >do with a file that starts with a "magic number" of "#!", and then how to >parse the following string...for example, having a whitespace char after >the "#!", is it really allowed? & etc. We found this hard to pin down >in POSIX/UNIXland. 20 years ago, I did write a shell that did handle #!. It first feeds the file to the OS and if thie returns ENOEXEC, then it checks for #!..... of course you need to be careful not to go into an endless loop. Jörg -- EMail:[email protected] (home) Jörg Schilling D-13353 Berlin [email protected] (uni) If you don't have iso-8859-1 [email protected] (work) chars I am J"org Schilling URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily