helpThe GNU Bourne-Again SHell - Support: sr #110252, parameter expansion with escaped...

 
 

sr #110252: parameter expansion with escaped quotes inside here-documents

Submitted by:  Trek <trek00>
Submitted on:  Sun 28 Jun 2020 11:26:49 PM UTC
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Fri 10 Jul 2020 03:33:17 PM UTC, comment #1: 

Thanks for the report. This was fixed back in March, 2020, and the fix is in the devel branch and bash-5.1-alpha.

Chet Ramey <chet>
Project Administrator
Sun 28 Jun 2020 11:26:49 PM UTC, original submission:  

hello,

parameter expansion with an expression containing escaped quotes behaves incorrectly inside here-documents, here a simple test:

  $ printf 'cat <<EOF\n${UNSET:-\\"test\\"}\nEOF\n' | bash
  \"test\"

where it works fine on ksh, dash, busybox, mksh:

  $ printf 'cat <<EOF\n${UNSET:-\\"test\\"}\nEOF\n' | ksh
  "test"

with bash it works fine outside here-documents:

  $ printf 'echo ${UNSET:-\\"test\\"}\n' | bash
  "test"

i found that bug developing http://www.trek.eu.org/devel/sysd2v

ciao!

Trek <trek00>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by trek00 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-10 chet StatusNone => Done

    Back to the top


    Powered by Savane 3.9