[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Broken "heredoc" mechanism in bash2.03
From: |
ben-fuzzybear |
Subject: |
Broken "heredoc" mechanism in bash2.03 |
Date: |
Sun, 24 Jun 2001 11:26:13 -0400 |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu'
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -I.
-I/home/swt/doko/export/packages/bash/bash-2.03
-I/home/swt/doko/export/packages/bash/bash-2.03/lib -I/usr/include -g -O2
uname output: Linux Odin.Thor 2.2.17 #6 SMP Thu Jan 18 18:42:39 EST 2001 i586
unknown
Machine Type: i386-pc-linux-gnu
Bash Version: 2.03
Patch Level: 0
Release Status: release
Description:
Doing an indented "cat <<- !" (tested with other terminators also)
fails as shown in the scripts below.
Repeat-By:
Here are two scripts that demonstrate the problem, in two different
ways.
--------------------------------------------------------------------
#!/bin/bash
case $1
in
a) cat <<- !
By itself, this works fine.
!
[ 1 ] && {
cat <<- !
This bang breaks it. Moving it to BOL, or even one tab
back, fixes the problem.
!
}
;;
b) cat <<- !
This one also works once that second bang is "fixed".
!
;;
esac
--------------------------------------------------------------------
--------------------------------------------------------------------
#!/bin/bash
while [ 1 ]
do
cat <<- !
By itself, this works fine.
!
cat <<- !
This bang breaks it. Moving it to BOL, or even one tab
back, fixes the problem.
!
done
--------------------------------------------------------------------
In both cases, the shell fails to read the terminator.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Broken "heredoc" mechanism in bash2.03,
ben-fuzzybear <=