helpAutoconf - Support: sr #107444, constructs generated by autoconf...


sr #107444: constructs generated by autoconf do not work in the ash shell

Submitted by:  Mark Hobley <markhobley>
Submitted on:  Tue 03 Aug 2010 08:30:57 AM UTC  
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 16 Sep 2010 10:31:08 PM UTC, comment #3:

Mark, I really need information on which version of ash this affects, before I can do anything about this bug report. Can you please answer?

Eric Blake <ericb>
Project Administrator
Tue 03 Aug 2010 05:52:00 PM UTC, comment #2:

Please report this to the dash maintainer, as Posix requires parameter expansion to occur for this word (quoting from SuSv3):

If the redirection operator is "<<" or "<<-" , the word that follows the redirection
operator shall be subjected to quote removal; it is unspecified whether any of the other
expansions occur. For the other redirection operators, the word that follows the
redirection operator shall be subjected to tilde expansion, parameter expansion, command
substitution, arithmetic expansion, and quote removal. Pathname expansion shall not be
performed on the word by a non-interactive shell; an interactive shell may perform it, but
shall do so only when the expansion would result in one word.

Which dash version is this BTW (or is it a real Almquist ash rather than dash)? My Debian dash 0.5.4-12 does not seem to have a problem with this construct.

Ralf Wildenhues <rwild>
Project Member
Tue 03 Aug 2010 09:10:58 AM UTC, comment #1:

Can you check if this works:

set abc 2
eval "echo \$1 >&$2"

Paolo Bonzini <bonzini>
Tue 03 Aug 2010 08:30:57 AM UTC, original submission:

Some versions of the ash shell will not allow redirection to a stream number held in a variable:

# This construct does not work in some versions of the ash shell
echo $1 >&$2

The autoconf tool sometimes generates scripts using this construct, The following is an example of a code snippet using this construct in a configure script:

if test "$3"; then as_lineno=${as_lineno-"$2"}
$as_echo "$as_me:${as_lineno-$LINENUM}: error: $1" >&$3

(I think this is coming from the _AS_ECHO_LOG macro).


PS: I tried to report this via email to -email is unavailable-
but the mail just bounces. There may be a fault with the bug tracker:

Message-ID: <>
<>: does not like recipient.
Remote host said: 550 (result of an earlier callout reused).
Giving up on

Mark Hobley <markhobley>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by ericb (Posted a comment)
  • -email is unavailable- added by rwild (Posted a comment)
  • -email is unavailable- added by bonzini (Posted a comment)
  • -email is unavailable- added by markhobley (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-08-03 rwild StatusNone => Need Info

    Back to the top

    Powered by Savane 3.4