Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 119470

Summary: bash 3.1 Parse bug in comment line with embedded quote
Product: Gentoo Linux Reporter: takken <d.h.j.takken>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: High    
Version: 2005.0   
Hardware: x86   
OS: Linux   
URL: http://lists.gnu.org/archive/html/bug-bash/2006-04/msg00020.html
Whiteboard:
Package list:
Runtime testing required: ---

Description takken 2006-01-18 11:28:17 UTC
The following BASH script fails to run on BASH 3.1:


--------------------------------------------------------------

#!/bin/bash 

 Test=$[ `

 # Remove the ' in this comment to make it work.

   for Counter in 1 2
     do
       echo "$Counter + "
     done
             ` 100 ]

 echo "$Test"

--------------------------------------------------------------

Removing the ' from the comment fixes the script. The script runs perfectly on BASH versions <= 3.0.
Comment 1 SpanKY gentoo-dev 2006-01-18 12:06:26 UTC
try this patch:
http://bugs.gentoo.org/attachment.cgi?id=77322
Comment 2 SpanKY gentoo-dev 2006-04-14 20:49:33 UTC
this isnt a regression and it has been fixed upstream, so the next release of bash will handle this properly