* sort bug?
@ 1994-07-20 23:41 Vicki Jordan
1994-07-21 15:52 ` Peter da Silva
1994-07-22 14:43 ` Frank Wortner
0 siblings, 2 replies; 5+ messages in thread
From: Vicki Jordan @ 1994-07-20 23:41 UTC (permalink / raw)
One of the daily news reports performs some operations on the log file
such as:
egrep unapproved $sus | sed 's/.*`\(.*\)'"'"'.*/\1/' | sort |
uniq -c | sort -nr | sed 5q >$tmp
egrep 'no subscribed' $sus | sed 's/.*`\(.*\)'"'"'.*/\1/' | sort |
uniq -c | sort -nr | sed 5q >$tmp
When the search is empty, sort generates a newline :
sort: Warning: A newline character was added to the end of the input.
sort: Warning: A newline character was added to the end of the input.
This results in a fairly stupid looking report...
top five supposedly-moderated groups with unmoderated postings:
1 "
leading five unsubscribed newsgroups:
1 "
Question:
Is this a bug or a feature?
--
Vicki Jordan V.Jordan@latrobe.edu.au
Computing Services phone: +61 03 479 1500
La Trobe University fax: +61 03 479 1999
Bundoora Vic 3083 Australia
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: sort bug?
1994-07-20 23:41 sort bug? Vicki Jordan
@ 1994-07-21 15:52 ` Peter da Silva
1994-07-22 14:43 ` Frank Wortner
1 sibling, 0 replies; 5+ messages in thread
From: Peter da Silva @ 1994-07-21 15:52 UTC (permalink / raw)
Definitely a bug.
--
Peter da Silva `-_-'
Network Management Technology Incorporated 'U`
1601 Industrial Blvd. Sugar Land, TX 77478 USA
+1 713 274 5180 "Hast Du heute schon Deinen Wolf umarmt?"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sort bug?
1994-07-20 23:41 sort bug? Vicki Jordan
1994-07-21 15:52 ` Peter da Silva
@ 1994-07-22 14:43 ` Frank Wortner
1994-07-22 15:32 ` Steve Morin
1 sibling, 1 reply; 5+ messages in thread
From: Frank Wortner @ 1994-07-22 14:43 UTC (permalink / raw)
In article <1994Jul20.234101.5587@lugb.latrobe.edu.au>, ccvj@misty.latrobe.edu.au (Vicki Jordan) writes:
|> One of the daily news reports performs some operations on the log file
|> such as:
|>
|> egrep unapproved $sus | sed 's/.*`\(.*\)'"'"'.*/\1/' | sort |
|> uniq -c | sort -nr | sed 5q >$tmp
|>
|> When the search is empty, sort generates a newline :
|> sort: Warning: A newline character was added to the end of the input.
|> sort: Warning: A newline character was added to the end of the input.
Well, if it's a bug, it's shared by every system I've tried. I checked
the local Sun, an ULTRIX system, and a DEC OSF/1 system and they all
produced a similar message when I did this:
echo -n " " | sort
GNU sort has the same effect --- adding a newline --- but it does not
produce a warning telling you what it has done.
Frank
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sort bug?
1994-07-22 14:43 ` Frank Wortner
@ 1994-07-22 15:32 ` Steve Morin
1994-07-23 0:37 ` Jeffrey Mogul
0 siblings, 1 reply; 5+ messages in thread
From: Steve Morin @ 1994-07-22 15:32 UTC (permalink / raw)
Frank Wortner (frank@niagara.nyo.dec.com) wrote:
The problem is not with the sort command, but with the uniq command.
Under OSF/1 2.0, uniq is broken.
hostname% uniq -c /dev/null returns:
1 "hostname%
Under Ultrix, SunOS 4.1.3, and Solaris 2.3, the same command returns:
hostname% uniq -c /dev/null
hostname%
I've copied the OSF/1 1.3 uniq binary to OSF/1 2.0, and that has solved the
problem.
Steve Morin
ECS
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1994-07-23 0:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-07-20 23:41 sort bug? Vicki Jordan
1994-07-21 15:52 ` Peter da Silva
1994-07-22 14:43 ` Frank Wortner
1994-07-22 15:32 ` Steve Morin
1994-07-23 0:37 ` Jeffrey Mogul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox