Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > gnu.bash.bug > #16752
| From | Hyunho Cho <mug896@gmail.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | heredoc seems to parse contents even with the quoted delimiter in shell prompt |
| Date | 2020-08-16 14:34 +0900 |
| Message-ID | <mailman.2251.1597559103.2739.bug-bash@gnu.org> (permalink) |
| References | <CAMMw470OANxwKOJX_h2M8PDK1W9H+FeGJ2jUtrzLftK81DkHJg@mail.gmail.com> |
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2
-fdebug-prefix-map=/build/bash-a6qmCk/bash-5.0=.
-fstack-protector-strong -Wformat -Werror=format-security -Wall
-Wno-parentheses -Wno-format-security
uname output: Linux EliteBook 5.4.0-42-generic #46-Ubuntu SMP Fri Jul
10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 5.0
Patch Level: 17
Release Status: release
####################################################################
if i use "test.sh" file for running shell script like this, there are
no error messages appear
bash$ cat test.sh
#!/bin/bash
cat << "EOF"
this is a test comment
$(info $(foo ${bar)))
EOF
bash$ ./test.sh # no error messages appear
this is a test comment
$(info $(foo ${bar)))
-----------------------------------------------------------------------------------------------------------
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
bash: command substitution: line 798: unexpected EOF while looking for
matching `}'
bash: command substitution: line 799: syntax error: unexpected end of file
this is a test comment
$(info $(foo ${bar)))
Back to gnu.bash.bug | Previous | Next | Find similar
heredoc seems to parse contents even with the quoted delimiter in shell prompt Hyunho Cho <mug896@gmail.com> - 2020-08-16 14:34 +0900
csiph-web