bug-bash
[Top][All Lists]
Advanced

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

Re: null command and parameter expansion for "Display error if null or u


From: Paul Jarc
Subject: Re: null command and parameter expansion for "Display error if null or unset"
Date: Mon, 31 Jul 2006 14:15:10 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)

"Dave Rutherford" <dave@evilpettingzoo.com> wrote:
> On 7/31/06, Poor Yorick <org.gnu.lists.bug-bash@pooryorick.com> wrote:
>> : ${FAKEVAR?} || echo hello
>
> Try this and then run your script:
>
> export FAKEVAR="echo This could have been rm -rf $HOME"

That won't do anything.  The contents of $FAKEVAR, if any, are just
passed as arguments to :, which does nothing.  Since the expansion
isn't quoted, word splitting and pathname expansion are applied -
that's extra useless work, but not harmful.


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]