Article View: comp.unix.shell
Article #182Re: Sort problem . .
From: Scott Merrilees
Date: Wed, 29 Jul 1992 04:46
Date: Wed, 29 Jul 1992 04:46
19 lines
1356 bytes
1356 bytes
Tom Christiansen <tchrist@convex.COM> writes: >From the keyboard of boyd@prl.dec.com (Boyd Roberts): >:In article <1992Jul27.140110.846@news.eng.convex.com>, Tom Christiansen <tchrist@convex.COM> writes: >:> ps axu | ( sed 1q ; sort -nr +3 ) >:Eh? Since when does sed do `unbuffered' reads? >:Nice idea though... >Hey -- it surprised the heck out of me too! But it did indeed work >without losing lines on a test run. Unforunately, I ran but one test, >and must have just gotten lucky, cause now I lose lines. >This does seem to work: > ps axu | (read line; echo "$line"; sort +3rn) ps axu | sed 1d | sort -nr +3 Sm -- Scott Merrilees, BHP Information Technology, Newcastle, Australia Internet: Sm@bhpese.oz.au Phone: +61 49 40 2132 Fax: ... 2165
Technical Details
Message-ID:
<1992Jul29.044600.27445@cerberus.bhpese.oz.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!merlin!cerberus!cerberus!SmReferences:
<1992Jul27.123415.977@leland.Stanford.EDU> <1992Jul27.140110.846@news.eng.convex.com> <1992Jul28.095415.4640@prl.dec.com> <1992Jul28.102938.12375@news.eng.convex.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.shell Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!merlin!cerberus!cerberus!Sm From: Sm@cerberus.bhpese.oz.au (Scott Merrilees) Subject: Re: Sort problem . . Organization: BHP, Newcastle, Australia Date: Wed, 29 Jul 1992 04:46:00 GMT Message-ID: <1992Jul29.044600.27445@cerberus.bhpese.oz.au> References: <1992Jul27.123415.977@leland.Stanford.EDU> <1992Jul27.140110.846@news.eng.convex.com> <1992Jul28.095415.4640@prl.dec.com> <1992Jul28.102938.12375@news.eng.convex.com> Sender: news@cerberus.bhpese.oz.au (News System) Lines: 19