bergman on 28 Jul 2009 19:22:26 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] sort by field ...



In the message dated: Tue, 28 Jul 2009 20:04:20 EDT,
The pithy ruminations from Ron Mansolino on 
<[PLUG] sort by field ...> were:
=> --===============1265358880==
=> Content-Type: multipart/alternative; boundary=0016e644d02cc94186046fcced82
=> 
=> --0016e644d02cc94186046fcced82
=> Content-Type: text/plain; charset=ISO-8859-1
=> Content-Transfer-Encoding: 7bit
=> 
=> The sort command I grew up with has a +n option, where n is the field
=> (usually space delimited) to key the sort on.
=> Currently, the options imply I have to create a key character-position by

Well, without giving details of "currently" (ie., what distro, the version 
number of sort(1), etc.), it's much harder to help you.

About 3 years ago(*), the interface on the default RedHat (and Debian,
I believe) sort(1) command changed...the "+n" option that us old fogies know I 
love was changed to drop the [undocumented] "+n" option. That functionality can 
be achieved through the "-k" option, as described in the man page.


=> character-position; how do I do that with random-length data?
=> 
=> (I'm analyzing log files and I'm used to piping them through this ALL THE
=> TIME HOW COME NOW THIS IS BORKEND)?

RTFM.


=> 
=> seriously, is this a bsd-ism, or something?


* Here's a semi-random sample of fine vintages of "sort" (though I'd prefer
  vintage port):

	  sort 2.0.14, copyright 2001 accepts and documents the "+" usage, but
          says:
		Warning: this option is obsolescent

	  sort version 5.0, copyright 2003 does not document the "+" usage, but
	  accepts it

	  sort version 5.2.1, copyright 2004 does not document the "+" usage,
	  but accepts it

	  sort 5.97 (2006) does not accept the "+" usage


Mark "I'll login to 5 different machines but I'm too lazy to
	check the CHANGELOG" Bergman

=> 
=> thanks
=> 
=> --0016e644d02cc94186046fcced82
=> Content-Type: text/html; charset=ISO-8859-1
=> Content-Transfer-Encoding: quoted-printable
=> 
=> The sort command I grew up with has a +n option, where n is the field (usua=
=> lly space delimited) to key the sort on.<br>Currently, the options imply I =
=> have to create a key character-position by character-position; how do I do =
=> that with random-length data?<br>
=> <br>(I&#39;m analyzing log files and I&#39;m used to piping them through th=
=> is ALL THE TIME HOW COME NOW THIS IS BORKEND)?<br><br>seriously, is this a =
=> bsd-ism, or something?<br><br>thanks<br><br>
=> 
=> --0016e644d02cc94186046fcced82--
=> 
=> --===============1265358880==
=> Content-Type: text/plain; charset="us-ascii"
=> MIME-Version: 1.0
=> Content-Transfer-Encoding: 7bit
=> Content-Disposition: inline
=> 
=> ___________________________________________________________________________
=> Philadelphia Linux Users Group         --        http://www.phillylinux.org
=> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
=> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
=> 
=> --===============1265358880==--
=> 



___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug