autoconf
[Top][All Lists]
Advanced

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

Re: Assigning command output to a variable


From: Adam Mercer
Subject: Re: Assigning command output to a variable
Date: Mon, 19 Nov 2012 16:32:47 -0600

On Mon, Nov 19, 2012 at 1:36 PM, Stefano Lattarini
<address@hidden> wrote:

> According to the Autoconf manual, the Tru64/OSF 5.1 sh might abort if
> the above is run and the /etc/redhat-release file doesn't exist, since
> that shell treats 'read' as a special (in POSIX sense) built-in.  See
> also Automake commit v1.11-289-g080efc9:
>
>   <git.savannah.gnu.org/cgit/automake.git/commit/?id=080efc9>

Good to know, thanks for the tip.

> In addition, some other brain-dead /bin/sh shells (yes, I'm looking at
> you, Solaris) seem to run commands specified in a stderr-redirected
> { ...; } compound command in a subshell:
>
>   $ /bin/sh -c 'a=ko; { a=ok; }; echo $a'
>   ok
>   $ /bin/sh -c 'a=ko; { a=ok; } 2>/dev/null; echo $a'
>   ko
>
> Not sure how all of this is still relevant today, though (and it
> certainly gives yet more good reasons to have Autoconf require a
> POSIX shell ... ;-)

Ug, maybe best to leave my original line...

Thanks for the help.

Cheers

Adam



reply via email to

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