On 8/16/20 1:34 AM, Hyunho Cho wrote: > > if i use the same script in shell prompt then strange error messages appear > > > bash$ cat << "EOF" > this is a test comment > $(info $(foo ${bar))) > EOF > bash: command substitution: line 798: unexpected EOF while looking for > matching `}' > bash: command substitution: line 799: syntax error: unexpected end of file
Thanks for the report. The shell is trying to find the end of the command to figure out how to store it in the history. When you're parsing a here- document, you need to leave the newlines in the history instead of maybe adding a semicolon. That code just needs to be more aware of when it can not parse due to being in the body of a here-document. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/