Re: shebang line parsing changed in FreeBSD6

2006-06-14 Thread Lowell Gilbert
Alfred Morgan [EMAIL PROTECTED] writes:

 Can someone explain to me why parsing of the shebang line changed?

http://www.freebsd.org/cgi/query-pr.cgi?pr=16393
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: shebang line parsing changed in FreeBSD6

2006-06-14 Thread Alfred Morgan

 http://www.freebsd.org/cgi/query-pr.cgi?pr=16393

I see that this problem is so convoluted that the shebang line has 
different implementations on the different systems.  What about the idea 
of adding a space after #! to indicate to parse it the way freebsd did.  
The space following #! will not affect old implementations and will 
signal the new implementation in FreeBSD6 to split up the arguments.


Examples:

Note the space after the #!.
This next line would work the same in both FreeBSD5 and FreeBSD6:
#! /bin/sh -x -e

Currently in FreeBSD6 we need to use env -S to get old functionality.
This will not work in FreeBSD5 because FreeBSD5's env is missing the -S 
option:

#!/usr/bin/env -S /bin/sh -x -e


Space after #! is better than the env -S solution we have now that 
doesn't work in FreeBSD5 or below.


-alfred

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]