[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
null command and parameter expansion for "Display error if null or unset
From: |
Poor Yorick |
Subject: |
null command and parameter expansion for "Display error if null or unset" |
Date: |
Mon, 31 Jul 2006 09:51:24 -0700 |
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 variables.
--
Poor Yorick
- null command and parameter expansion for "Display error if null or unset",
Poor Yorick <=