[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bash-bug
Subject:    Re: parsing error with heredoc and command substitution
From:       Chet Ramey <chet.ramey () case ! edu>
Date:       2010-07-15 13:24:15
Message-ID: 100715132415.AA61289.SM () caleb ! INS ! CWRU ! Edu
[Download RAW message or body]

> Bash Version: 4.1
> Patch Level: 5
> Release Status: release
> 
> Description:
> 
> The following script used to work in bash 3.2 but does not work with
> bash 4.x (I tried 4.0, 4.1.5, and 4.1.7)
> 
> ------
> #!/bin/bash
> 
> a=$(/bin/cat << EOF | wc -l
> a
> b
> EOF
> )
> -----
> 
> /tmp/bug.sh: line 3: unexpected EOF while looking for matching `)'
> /tmp/bug.sh: line 8: syntax error: unexpected end of file

Thanks for the report.  This will be fixed in the next release of bash.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic