From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,8bcfc803cebb8a9f X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-07-22 07:47:39 PST Newsgroups: comp.unix.osf.osf1 Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!datum.nyo.dec.com!niagara.nyo.dec.com!frank From: frank@niagara.nyo.dec.com (Frank Wortner) Subject: Re: sort bug? Message-ID: <1994Jul22.144309.27946@datum.nyo.dec.com> Sender: usenet@datum.nyo.dec.com (USENET News System) Reply-To: frank@niagara.nyo.dec.com (Frank Wortner) Organization: Digital Equipment Corporation X-Newsreader: mxrn 6.18-16 References: <1994Jul20.234101.5587@lugb.latrobe.edu.au> Date: Fri, 22 Jul 1994 14:43:09 GMT 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