bug-bash
[Top][All Lists]
Advanced

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

bash 4.1 command substitution


From: John Kelly
Subject: bash 4.1 command substitution
Date: Wed, 08 Dec 2010 15:50:15 -0000

>bash --version
>GNU bash, version 4.1.7(1)-release (i586-pc-interix3.5)

#! /usr/local/bin/bash

one=`cat data`
echo one=$one

two=$(cat data)
echo two=$two


>one=abc
>./xs: command substitution: line 7: syntax error near unexpected token `)'
>./xs: command substitution: line 7: `cat data)'
>two=


Backquote command substitution works, but $(...) does not.  Running it
with /bin/sh (the default system ksh) works fine.

>$ sh xs
>one=abc
>two=abc


I built it like this:

>
>CFLAGS="-O2 -march=i686" \
>./configure \
>    --mandir=/usr/local/man \
>    --enable-process-substitution


Is this a bug or am I doing something stupid?



-- 
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php
 


reply via email to

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