SLUG Mailing List Archives
Re: [SLUG] mkdir and $?
- To: Penguinillas <slug@xxxxxxxxxxx>
- Subject: Re: [SLUG] mkdir and $?
- From: getadog <getadog@xxxxxxxxxxxxxxxx>
- Date: Fri Jul 6 21:56:02 2001
- User-agent: Mutt/1.3.18i
On Fri, Jul 06, 2001 at 09:20:52PM +1000, Jeff Waugh wrote:
> This is annoying - if anyone knows why this is happening, please tell me.
> I'm only interested in the errno, not the error (which is not set with -p,
> as stated in the docs).
> For some reason, testing if $? = 0 is always false, even if $? really ought
> to be true (ie. it's built all the directories and $ERROR = 0). Argh!
Are you meaning to test the string length of $? ?
Does this work for you?
if [ "$ERRNO" -ne 0 ]; then