dagmar at speakeasy.net
Sat Oct 19 14:26:37 PDT 2002
On Fri, 18 Oct 2002, Ian Molton wrote:
> Has anyone noticed that using "EOF" in the book doesnt work?
> For example:
> cat > /usr/bin/lex << "EOF"
> # Begin /usr/bin/lex
> exec /usr/bin/flex -l "$@"
> # End /usr/bin/lex
I don't know why you guys do it that way... I *much* prefer so that it
remains visually obvious where the output is going.
cat << EOF > script.sh
# Begin /usr/bin/lex
exec /usr/bin/flex -l "$@"
# End /usr/bin/lex
_However_ there's still the small matter of the dollar sign part of $@
needing to be escaped (\$@), and the EOF definitely doesn't need to be in
quotes. ...and Bill was definitely right about the quotes around $@
messing up the way it gets passed to flex (making it one long argument
when it should be a list).
The only time you'd want to put quotes around that terminator token would
be if you wanted to annoy other programmers with trailing spaces.
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message
More information about the lfs-dev