[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autoconf 2.60?

From: Ludovic Courtès
Subject: Re: Autoconf 2.60?
Date: Thu, 24 Jun 2004 10:39:28 +0200
User-agent: Mutt/1.5.4i [Guile enabled]


Yesterday, 13 hours, 18 minutes, 41 seconds ago, Paul Eggert wrote:
> Did you try the script on one of those shells?  Here it is again.  If
> it doesn't print "hello", what is the output of "sh -x script?
> #!/bin/sh
> ENV=sdf
> readonly ENV
> as_unset=unset
> for as_var in ENV MAIL MAILPATH
> do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
> done
> echo "hello"

Oh, right.  I had overlooked it and had not seen the brackets around the
first unset.  So, yes, it does work as expected, ie. it does not try
unset ENV and "hello" gets printed.  And it's much more simple and
reliable than the patch I proposed.

> The message is being hidden, but the exit status is being followed.
> Or are you saying that the exit status of "(unset ENV)" is zero?

The exit status of "(unset ENV)" actually is non-zero as you expected.

Sorry for misunderstanding you.  ;-)


reply via email to

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