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: Dave Rutherford
Subject: Re: null command and parameter expansion for "Display error if null or unset"
Date: Mon, 31 Jul 2006 14:53:27 -0400

On 7/31/06, Paul Jarc <address@hidden> wrote:
"Dave Rutherford" <address@hidden> wrote:
> On 7/31/06, Poor Yorick <address@hidden> 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.

Oh, yes; you're quite right.  I couldn't see the colon in this font
and thought he was evaluating a possibly nonempty variable
as a command, which is apparently a bad idea that no-one had.

Sorry.

Dave




reply via email to

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