Mark Wilkinson writes:
>
> I've just noticed that when doing a "here" document with cat, the shell seems to
> discard the
> first character of the first line read.
>
> shell/iX> cat<<EOF
> > hello
> > hello again
> > byee
> > EOF
> ello
> hello again
> byee
> shell/iX>
>
> Is this a bug or normal behaviour?
It's a bug, and it's not just the first character. If you do a really big
here document, you'll lose multiple characters throughout.
I reported it to the HPRC several months ago when I encountered it bringing
Apache up to date.
The workaround is to use /bin/cat instead. It's only the shell's built-in
version of cat that is broken.
--
Mark Bixby E-mail: [log in to unmask]
Coast Community College Dist. Web: http://www.cccd.edu/~markb/
District Information Services 1370 Adams Ave, Costa Mesa, CA, USA 92626-5429
Technical Support Voice: +1 714 438-4647
"You can tune a file system, but you can't tune a fish." - tunefs(1M)