Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16752

heredoc seems to parse contents even with the quoted delimiter in shell prompt

Path csiph.com!weretis.net!feeder8.news.weretis.net!goblin3!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
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 Sun, 16 Aug 2020 14:34:02 +0900
Lines 53
Approved bug-bash@gnu.org
Message-ID <mailman.2251.1597559103.2739.bug-bash@gnu.org> (permalink)
References <CAMMw470OANxwKOJX_h2M8PDK1W9H+FeGJ2jUtrzLftK81DkHJg@mail.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
X-Trace usenet.stanford.edu 1597559104 14769 209.51.188.17 (16 Aug 2020 06:25:04 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=JYdVbyZvQasWap52eRUVgDVkHYFk1yKlxJY8JkoxaMk=; b=tEp9mzkhJQ5tx9A8MCOENQJIupytIVVOHdAhriWFSVr51A5QQ8v+YtDV0fXgCngOsL uLUCVTmoqIiIq65t4h/TLZG4qZz8XCEV/se5CFQpWt/uSf2z6fmO9c9sNhT1z2+xwNuv NvowmoClkAA1Mea8o+9jPkMfEoT5TEL0QJqGpmvb5Yqc9COBL7mv/ah+wE0yiW7PIdPq OY3ZIV3EyOXiK1lma1RW1+GXDl3L4R515rrDn3dpEneJAQqIIiwL2FBlaE0pzz/JmW1B Gyb194NPfHdp0rkpCm8TFGZ7QKq4a5SrQy+WEfB4W7ljbmdcVhTX+7mj3BCp/zFG42o8 HSVg==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=JYdVbyZvQasWap52eRUVgDVkHYFk1yKlxJY8JkoxaMk=; b=W7191qwxf4W8XZblTZnPakALhbjBkjqeVjwCa56Matr7ePOQSKlU5rc4+iwQOyDp9j XIwJI4CnXqZX06ZF4Lm7+JzHLTXGLijs9p8jvGmf9a10Fm8Vb6A6J7tQMElH014G1KGs Luc0gih4wVyb9pibJ1h9UMmlrpiEkTQPXuUJbkzogIxiiRa+6p8AS12M1s5y5x7C/SMD LnYKj42FhopYEQoXZNcpBVsAl1JxT3VdruGGkKAPFuZsfzIq3ey+bo9Nb6jcKp61fbom Y4/g0dD6kK0GgndZZlrgqGNBvRX8lUx+9eINTaMe4m1W8vpR7yWKhEAcN5PFQrO0CtHs QzNw==
X-Gm-Message-State AOAM531h4IWfn4rATxBdj2rv89xhBBYOM/2e3ievpisSVu5KgXbjetBK X3XT/UeNMdcqoRSLGcLOJuE1BdRBYrbWofCx+joHa4tYbf3XAA==
X-Google-Smtp-Source ABdhPJzbrcWk9ey8F2O9OQ851dcYmGzalIUtjk6fu4Ft8Byx9LH25wICzePMArTxivIut42+KVglBZoHPvScLKH0tVE=
X-Received by 2002:a1f:5c17:: with SMTP id q23mr5269028vkb.75.1597556053701; Sat, 15 Aug 2020 22:34:13 -0700 (PDT)
Received-SPF pass client-ip=2607:f8b0:4864:20::a30; envelope-from=mug896@gmail.com; helo=mail-vk1-xa30.google.com
X-detected-operating-system by eggs.gnu.org: No matching host in p0f cache. That's all we know.
X-Spam_score_int -17
X-Spam_score -1.8
X-Spam_bar -
X-Spam_report (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no
X-Spam_action no action
X-Mailman-Approved-At Sun, 16 Aug 2020 02:25:03 -0400
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <CAMMw470OANxwKOJX_h2M8PDK1W9H+FeGJ2jUtrzLftK81DkHJg@mail.gmail.com>
Xref csiph.com gnu.bash.bug:16752

Show key headers only | View raw


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


Thread

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