Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

here-document/multiline parameter conflict



I didn't see this mentioned in Etc/BUGS for 3.0.0.  Is the following
behavior by design?  It seems really bizarre.

This (trivial) script works under a standard ksh:
#!/bin/ksh
cat <<EOF | sed -e '/t/{
s/t/T/
}'
one
three
five
EOF

Changing the first line to #!/usr/local/bin/zsh -f yields this:
quirk: unmatched ' [9]

However, if I embed the here-document within the parameter to sed, it
works under zsh:
#!/usr/local/bin/zsh -f
cat <<EOF | sed -e '/t/{
one
three
five
EOF
s/t/T/
}'
-- 
J.D. Laub (Laubster) HBOC/CliniCom|"I think you're very, very, very, very, very,
jdl@xxxxxxxxxxxx     Boulder,CO   |very, very, very, very, ..." - Flying Lizards



Messages sorted by: Reverse Date, Date, Thread, Author