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

From: Barry Margolin (barry.margolin_at_level3.com)
Date: 07/17/03

  • Next message: Stephane CHAZELAS: "Re: Call for input on comp.unix.shell FAQ"
    Date: Wed, 16 Jul 2003 22:13:38 GMT
    
    

    In article <80kRa.77$oY1.43358@news.uswest.net>,
    Michael Wang <mwang@unixlabplus.com> wrote:
    >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?

    Applications that want to invoke your preferred shell (e.g. any application
    with a "!" escape to the shell) make use of the environment variable. If
    you don't export it, it will still be set to your original login shell, not
    the shell you're actually executing.

    -- 
    Barry Margolin, barry.margolin@level3.com
    Level(3), Woburn, MA
    *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
    Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
    

  • Next message: Stephane CHAZELAS: "Re: Call for input on comp.unix.shell FAQ"

    Relevant Pages