Re: Call for input on comp.unix.shell FAQ

From: Michael Wang (mwang_at_unixlabplus.com)
Date: 07/17/03


Date: Wed, 16 Jul 2003 22:07:00 GMT

In article <slrnbhbfhu.9oq.stephane_chazelas@pcchazelas.free.fr>,
Stephane CHAZELAS <stephane_chazelas@yahoo.fr> wrote:
>>> SHELL=/prefered/shell export SHELL
>>> exec "$SHELL"
>>
>> Just for safty sake shouldn't there be a ';' before that export?
>
>That should make no difference in any shell I know. But putting
>a ";" is OK.
>
>> Or maybe just save a few bytes with " export SHELL=/prefered/shell"
>
>This is not portable (export statement parsing is not the same
>is ash, zsh, bash, ksh in that accurrence). Bourne shell doesn't
>accept that kind of construct. I find the Bourne way makes more
>sense.

Why should export be needed in the first place?

-- 
Michael Wang * http://www.unixlabplus.com/ * mwang@unixlabplus.com


Relevant Pages