[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
missing option in shell's set command
- To: bugs_(_at_)_openbsd_(_dot_)_org
- Subject: missing option in shell's set command
- From: Pharis Monalo <hadarot_(_at_)_yahoo_(_dot_)_com>
- Date: Thu, 11 Aug 2005 00:27:32 -0700 (PDT)
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:
[ "`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
Visit your host, monkey.org