Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: ccvj@misty.latrobe.edu.au (Vicki Jordan)
Subject: sort bug?
Date: Wed, 20 Jul 1994 23:41:01 GMT	[thread overview]
Message-ID: <1994Jul20.234101.5587@lugb.latrobe.edu.au> (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


             reply	other threads:[~1994-07-20 23:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-07-20 23:41 Vicki Jordan [this message]
1994-07-21 15:52 ` sort bug? Peter da Silva
1994-07-22 14:43 ` Frank Wortner
1994-07-22 15:32   ` Steve Morin
1994-07-23  0:37     ` Jeffrey Mogul
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox