bug-bash
[Top][All Lists]
Advanced

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

Re: bash 4.1 command substitution


From: Dennis Williamson
Subject: Re: bash 4.1 command substitution
Date: Fri, 6 Aug 2010 16:28:20 -0500

I can't reproduce your problem. Does this work?:

three=$(< data)
echo three=$three

On Fri, Aug 6, 2010 at 12:31 PM, John Kelly <jak@isp2dial.com> wrote:
>
>>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]