🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #910

grep 1.6 mishandles incomplete lines

#910
From: Paul Eggert
Date: Wed, 14 Oct 1992 02:43
11 lines
811 bytes
grep 1.6 mishandles files that end in a non-newline character:
it silently pretends there was a trailing newline.  The following
shell scenario illustrates the problem.  `cat' and traditional `grep'
output the incomplete line as-is; but GNU grep outputs a newline at the end.

$ echo -n x >x
$ cat x
x$ grep x x # GNU grep
x
$ /bin/grep x x # traditional grep
x$ 
Technical Details
Message-ID: <9210140243.AA17929@farside.twinsun.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!twinsun.COM!eggert

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!twinsun.COM!eggert
From: eggert@twinsun.COM (Paul Eggert)
Subject: grep 1.6 mishandles incomplete lines
Message-ID: <9210140243.AA17929@farside.twinsun.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 14 Oct 1992 02:43:04 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 12