HP3000-L Archives

April 1999, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Date:
Thu, 8 Apr 1999 08:42:59 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
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)

ATOM RSS1 RSS2