bug-bash
[Top][All Lists]
Advanced

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

new-style command substitution generates syntax error near ')'


From: esumbar
Subject: new-style command substitution generates syntax error near ')'
Date: Thu, 12 Mar 2009 09:01:12 -0600 (MDT)

Configuration Information [Automatically generated, do not change]:
Machine: amd64
OS: freebsd7.1
Compiler: cc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='amd64' 
-DCONF_OSTYPE='freebsd7.1' -DCONF_MACHTYPE='amd64-portbld-freebsd7.1' 
-DCONF_VENDOR='portbld' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' 
-DSHELL  -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  -I/usr/local/include 
-O2 -fno-strict-aliasing -pipe
uname output: FreeBSD hurl.aict.ualberta.ca 7.1-RELEASE FreeBSD 7.1-RELEASE #0: 
Thu Jan  1 08:58:24 UTC 2009     
root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
Machine Type: amd64-portbld-freebsd7.1

Bash Version: 4.0
Patch Level: 10
Release Status: release

Description:
        Bash reports syntax error near unexpected token `)' for
  new-style command substitution syntax, i.e., $(command)
  in interactive and non-interactive shells.

Repeat-By:
        $ abc=$(ls)
  bash: command substitution: line 5: syntax error near unexpected token `)'
  bash: command substitution: line 5: `date)'

  Continuing the command interactively over two lines works
  $ abc=$(date
  > )
  $ echo $zzz
  Thu 12 Mar 2009 08:50:40 MDT

  Old-style command substitution works as expected.
  $ def=`date`
  $ echo $def
  Thu 12 Mar 2009 08:59:49 MDT




reply via email to

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