[Top][All Lists]

[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: Fri, 06 Aug 2010 17:31:08 +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

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

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

>$ sh xs

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

reply via email to

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