Poor Yorick wrote:
> The following line does not perform the "echo" command.
>
> : ${FAKEVAR?} || echo hello
>
> This seems inconsistent, since the return status is set to one, not
> to mention that the null command is documented to return a zero exit
> code. It would be a convenient and concise
On 7/31/06, Paul Jarc <[EMAIL PROTECTED]> wrote:
"Dave Rutherford" <[EMAIL PROTECTED]> wrote:
> On 7/31/06, Poor Yorick <[EMAIL PROTECTED]> 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 anyth
mwoehlke <[EMAIL PROTECTED]> wrote:
> Poor Yorick wrote:
>> The following line does not perform the "echo" command.
>> : ${FAKEVAR?} || echo hello
>
> What you probably want is:
> [ "$FAKEVAR" ] || echo hello
That doesn't distinguish between an unset variable and a variable set
to an empty value.
"Dave Rutherford" <[EMAIL PROTECTED]> wrote:
> On 7/31/06, Poor Yorick <[EMAIL PROTECTED]> 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
pa
Poor Yorick wrote:
The following line does not perform the "echo" command.
: ${FAKEVAR?} || echo hello
This seems inconsistent, since the return status is set to one,
not to mention that the null command is documented to return a
zero exit code. It would be a convenient and concise syntax for
On 7/31/06, Poor Yorick <[EMAIL PROTECTED]> wrote:
The following line does not perform the "echo" command.
: ${FAKEVAR?} || echo hello
This seems inconsistent, since the return status is set to one, not to mention
that the null command is documented to return a zero exit code. It would be a
The following line does not perform the "echo" command.
: ${FAKEVAR?} || echo hello
This seems inconsistent, since the return status is set to one, not to mention
that the null command is documented to return a zero exit code. It would be a
convenient and concise syntax for acting on unset var
The following command does not echo "hello".
: ${FAKEVAR?} || echo hello
This seems inconsistent, since the return status is set to 1. It would be a
convenient and concise syntax for acting on unset variables.
--
Poor Yorick
___
Bug-bash mailing l