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

missing option in shell's set command



I am running OpenBSD 3.7 stable on a x86.
Since the team has modified the code of pdksh such
that both "sh" and "ksh" are the same exact binary,
save that this binary disables a few features when run
as "sh", an option should be added to the shell's
"set" command that can dynamically configure whether
the shell behaves as "sh" or as "ksh".
For example, let's say I have a script in which I want
to use some feature/syntax available in OpenBSD's ksh
but not sh.  But I also run the script on other
machines, where "sh" supports these features, but
where there is no "/bin/ksh".  Thus I can run the
script on both machines:

#!/bin/sh
[ "`uname -s`" = OpenBSD ] && set -o ksh

Of course there would be a complementary "set -o sh"
(compare the emacs and vi options to the set command).
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



Visit your host, monkey.org