which distro, and which eratta applied ?
-G
On 06-Jul-01 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!
>
> poo:
>
>#!/bin/bash
> echo "the errno is currently $?"
> echo "making pants"
> ERROR=$(mkdir -p pants/pants/pants/pants/pants/on 2>&1)
> ERRNO=$?
> if [ ! -z $? ]; then
> echo "mkdir did not exit with 0"
> echo "error: $ERROR"
> echo "errno: $ERRNO"
> fi
>
> poo's output:
>
> the errno is currently 0
> making pants
> mkdir did not exit with 0
> error:
> errno: 0
>
> find pants:
>
> pants
> pants/pants
> pants/pants/pants
> pants/pants/pants/pants
> pants/pants/pants/pants/pants
> pants/pants/pants/pants/pants/on
>
> - Jeff
>
> --
> http://www.xach.com/debian-users-are-beatniks.html
>
> --
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://lists.slug.org.au/listinfo/slug
+---------------------------------------------------------------------+
"DOS Computers manufactured by companies such as IBM, Compaq, Tandy, and
millions of others are by far the most popular, with about 70 million
machines in use wordwide. Macintosh fans, on the other hand, may note that
cockroaches are far more numerous than humans, and that numbers alone do
not denote a higher life form." (New York Times, November 26, 1991)
| Greg Hosler i-net: [EMAIL PROTECTED] |
+---------------------------------------------------------------------+
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug