simple code snippet:
$ cat test.sh
func() {
cat > / <<EOF || echo FAIL
11
EOF
}
declare -fp
when run, we see the || statement is incorrectly moved to after the heredoc:
$ bash ./test.sh
func ()
{
cat > / <<EOF
11
EOF
|| echo FAIL
}
every version of bash i tried fails this way (2.05b through 4.2.45)
-mike
signature.asc
Description: This is a digitally signed message part.
