Re: Non-POSIX shells



ERDI Gergo wrote:

> you realize, of course, that this is useless for shell scripts when you
> need to write something in the shebang line.

It is; welcome to the POSIX world. POSIX cannot solve the shell
bootstraping problem because it would have to require something from
non-conformant environments. Since they are non-conformant, they don't
have to conform to anything POSIX says.

On Solaris you could solve the problem in practice by writing a /bin/sh
script which would invoke "/bin/getconf PATH" and stick the result
(/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin on current OS
versions) in the PATH variable and then invoke sh utility. Then you'd get
POSIX sh utility.

However, the PATH argument for the getconf utility is a Solaris extension
and not universally available. So you'd have to implement a different
procedure for different operating systems. Which isn't very appealing.

-- 
 .-.   .-.    I don't think for my employer.
(_  \ /  _)
     |        dave willfork com
     |
_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]