Re: Non-POSIX shells
- From: Drazen Kacar <dave willfork com>
- To: ERDI Gergo <cactus cactus rulez org>
- Cc: Sander Vesik <Sander Vesik Sun COM>, GNOME hackers <gnome-hackers gnome org>
- Subject: Re: Non-POSIX shells
- Date: Tue, 5 Mar 2002 23:40:07 +0100
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
|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]