[lsb-discuss] /usr/bin/env bash

Joerg Schilling schilling at fokus.fraunhofer.de
Wed Aug 18 06:30:06 PDT 2004


>From: Mark Brown <bmark at us.ibm.com>

>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:joerg at schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js at cs.tu-berlin.de		(uni)  If you don't have iso-8859-1
       schilling at fokus.fraunhofer.de	(work) chars I am J"org Schilling
 URL:  http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily




More information about the lsb-discuss mailing list