<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sorting a list by a field in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944711#M95402</link>
    <description>Hi Dennis:&lt;BR /&gt;&lt;BR /&gt;Your points are well-taken and I wasn't trying to be glib.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; You say the field ends in field 7, position 10. But there is only one field. There is no other fields that could be added that would cause the sort to mysteriously fail, so it works. &lt;BR /&gt;&lt;BR /&gt;I agree.  If you had data like this (file):&lt;BR /&gt;&lt;BR /&gt;03/03/2006,1&lt;BR /&gt;01/03/2007,2&lt;BR /&gt;11/11/2006,3&lt;BR /&gt;10/10/2005,4&lt;BR /&gt;04/02/2006,5&lt;BR /&gt;02/04/2006,6&lt;BR /&gt; 4/ 4/2004,7&lt;BR /&gt;5/5/2005  ,8&lt;BR /&gt;05/06/2005,9&lt;BR /&gt;&lt;BR /&gt;Hence, with the default delimiter in force (a blank) I want to limit the key as I originally wrote:&lt;BR /&gt;&lt;BR /&gt;# sort -kn1.7,1.10 -kn1.1,1.2 -kn1.3,1.4 file&lt;BR /&gt;&lt;BR /&gt;(not)&lt;BR /&gt;&lt;BR /&gt;# sort -kn1.7 -kn1.1,1.2 -kn1.3,1.4 file&lt;BR /&gt;&lt;BR /&gt;&amp;gt; ...also [I] don't see that "n" is allowed before the position, it should be at the end:&lt;BR /&gt;-k1.7n,1.10n&lt;BR /&gt;&lt;BR /&gt;Yes, I guess that does seem more reasonable.  The 'sort' manpages note:&lt;BR /&gt;&lt;BR /&gt;/*begin_quote*/&lt;BR /&gt;&lt;BR /&gt;The arguments field_start and field_end each have the form m.n which are optionally followed by one or more of the type options b, d, f, i, n, r, or M. These modifiers have the functionality for this key only, that their command-line counterparts have for the entire record.&lt;BR /&gt;&lt;BR /&gt;/*end_quote*/&lt;BR /&gt;&lt;BR /&gt;So, are we closer in agreement?&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 15 Feb 2007 13:23:05 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2007-02-15T13:23:05Z</dc:date>
    <item>
      <title>Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944690#M95381</link>
      <description>&lt;BR /&gt;Greetings,&lt;BR /&gt;&lt;BR /&gt;I have a list with one of the field in the mm/dd/yy format and I would like to sort by that field, chronologically. I've read the man page on sort but cannot quite get it to sort correctly. Advice?</description>
      <pubDate>Wed, 14 Feb 2007 13:38:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944690#M95381</guid>
      <dc:creator>dictum9</dc:creator>
      <dc:date>2007-02-14T13:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944691#M95382</link>
      <description>Did you try "sort -n"?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 14 Feb 2007 13:43:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944691#M95382</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2007-02-14T13:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944692#M95383</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;OK, given this file:&lt;BR /&gt;&lt;BR /&gt;03/03/2006&lt;BR /&gt;01/03/2007&lt;BR /&gt;11/11/2006&lt;BR /&gt;10/10/2005&lt;BR /&gt;04/02/2006&lt;BR /&gt;02/04/2006&lt;BR /&gt;&lt;BR /&gt;#  sort -kn1.7,7.10 -kn1.1,1.2 -kn1.3,1.4 /tmp/0214b&lt;BR /&gt;&lt;BR /&gt;10/10/2005&lt;BR /&gt;02/04/2006&lt;BR /&gt;03/03/2006&lt;BR /&gt;04/02/2006&lt;BR /&gt;11/11/2006&lt;BR /&gt;01/03/2007&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 14 Feb 2007 14:00:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944692#M95383</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-02-14T14:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944693#M95384</link>
      <description>&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Actually, in my case, the date is the 8th field on the line, and sometimes it's in the 80th column and sometimes not. So it's not always in the same column. &lt;BR /&gt; How do I account for this inconsistency? Can I use awk?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Feb 2007 15:01:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944693#M95384</guid>
      <dc:creator>dictum9</dc:creator>
      <dc:date>2007-02-14T15:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944694#M95385</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Actually, in my case, the date is the 8th field on the line, and sometimes it's in the 80th column and sometimes not. So it's not always in the same column. &lt;BR /&gt;How do I account for this inconsistency? Can I use awk?&lt;BR /&gt;&lt;BR /&gt;This doesn't matter.  The 'sort' counts its keys from one.  Hence '-k1' means the first field and '-k8' would be the eighth.  Fields are delimited by whatever you specify in '-t'.  Hence '-t' without further qualification means a blank as a field delimiter regarless of what "column" offset.&lt;BR /&gt;&lt;BR /&gt;Have another look at the manpages for 'sort' using the solution I first posted.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 14 Feb 2007 15:14:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944694#M95385</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-02-14T15:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944695#M95386</link>
      <description>The definition of a field is that it is an unambiguous element so the concept of columns is unimportant. As long as the definition of each field is unique (ie, each field is separated by a : or , or / etc) then parsing the elements is trivial with many commands like sort, awk, cut, etc. To see this at work, run the cut command to find the user and the user's HOME directory (fields 1 and 6):&lt;BR /&gt; &lt;BR /&gt;cut -f 1,6 -d: /etc/passwd&lt;BR /&gt; &lt;BR /&gt;-d is the field delimiter. For awk, you specify the delimiter with -F and for sort the field delimiter is set with -t. awk is particularly useful as it predefines variables like NF (number of fields) so regardless of spacing, the last field can be extracted with $NF as in:&lt;BR /&gt; &lt;BR /&gt;awk -F: '{print $1,$NF}' /etc/passwd&lt;BR /&gt; &lt;BR /&gt;which prints the username and the shell.&lt;BR /&gt; &lt;BR /&gt;Now your list may have fields defined with one delimiter such as a comma and within the field, data such as mm/dd/yy that uses / as a separator. That will be a problem because sort cannot understand nested fields. If you can show an example line, perhaps wew can suggest a way to sort it.</description>
      <pubDate>Wed, 14 Feb 2007 16:35:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944695#M95386</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2007-02-14T16:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944696#M95387</link>
      <description>Just out of curiosity,&lt;BR /&gt;because I am more accustomed to Perl's sort and seldom use Unix sort.&lt;BR /&gt;Isn't there a typo in James' solution in the end field specifier of the 1st sort criteria,&lt;BR /&gt;and shouldn't it rather be something like:&lt;BR /&gt;&lt;BR /&gt;$ sort -n -k 1.7,1.10 -k 1.1,1.2 -k 1.3,1.4 &amp;lt; /file/to/sort.ascii&lt;BR /&gt;&lt;BR /&gt;I'm not asking to appear a smart-ass&lt;BR /&gt;but rather to understand Unix sort better.</description>
      <pubDate>Thu, 15 Feb 2007 03:57:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944696#M95387</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2007-02-15T03:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944697#M95388</link>
      <description>&amp;gt;Ralph: Isn't there a typo in James' solution&lt;BR /&gt;&lt;BR /&gt;It looks like it.  Though I don't think you can have a space after -k and you don't need "&amp;lt;" for file input.</description>
      <pubDate>Thu, 15 Feb 2007 04:18:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944697#M95388</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-02-15T04:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944698#M95389</link>
      <description>Hi,&lt;BR /&gt;as it is field 8 and the format is DD/MM/YY should it not be:&lt;BR /&gt;sort -n -k 8.7,8.9 -k 8.1,8.2 -k 8.4,8.5</description>
      <pubDate>Thu, 15 Feb 2007 04:29:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944698#M95389</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-02-15T04:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944699#M95390</link>
      <description>Hi, [ CORRECTION to stated date format ]&lt;BR /&gt;as it is field 8 and the format is MM/DD/YY should it not be:&lt;BR /&gt;sort -n -k 8.7,8.9 -k 8.1,8.2 -k 8.4,8.5 &lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2007 04:30:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944699#M95390</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-02-15T04:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944700#M95391</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;thanks for confirmation.&lt;BR /&gt;I was really puzzled what that 7 meant,&lt;BR /&gt;till I realized that in Anglo-American writing of Arabic numbers the 7, unlike in German, doesn't get the short horizontally crossing dash (which I find better disambiguates it from the 1; ok we supply the 1 with a short ascending noselike slash which could lead to misreading it as an Anglo-American 7, that's why we prefer the dash ;-)&lt;BR /&gt;So it seemed obvious that it was a typo.&lt;BR /&gt;&lt;BR /&gt;I acknowledge that probably each Unix derivative has its own sort syntax (another pro for Perl).&lt;BR /&gt;But according to the synopsis of HP-UX's sort manpage there may be a space between -k and field specifier.&lt;BR /&gt;&lt;BR /&gt;&lt;MAN_SORT_QUOTE&gt;&lt;BR /&gt; SYNOPSIS&lt;BR /&gt;      sort [-m] [-o output] [-bdfinruM] [-t char] [-k keydef] [-y [kmem]] [-z&lt;BR /&gt;      recsz] [-T dir] [file ...]&lt;BR /&gt;&lt;BR /&gt;      sort [-c] [-AbdfinruM] [-t char] [-k keydef] [-y [kmem]] [-z recsz] [-T&lt;BR /&gt;      dir] [file ...]&lt;BR /&gt;&lt;/MAN_SORT_QUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;Ok, the redirection of stdin is redundant&lt;BR /&gt;but seems to work.</description>
      <pubDate>Thu, 15 Feb 2007 04:37:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944700#M95391</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2007-02-15T04:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944701#M95392</link>
      <description>&lt;!--!*#--&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;what 'etc' is telling us about 'not the same column' may be the fact, that there may be 'empty' columns, which count for 'sort' by default. Such empty fields sort before any filled fields, of course.&lt;BR /&gt;You can skip empty fields by using the option '-b'. In the example below there are several :&lt;BR /&gt;sort -k2n,3n -k 3&lt;BR /&gt;yy    1    bb&lt;BR /&gt;aa 1 ba&lt;BR /&gt;will output&lt;BR /&gt;yy    1    bb&lt;BR /&gt;aa 1 ba&lt;BR /&gt;&lt;BR /&gt;but&lt;BR /&gt;sort -b -k2n,3n -k 3&lt;BR /&gt;yy    1    bb&lt;BR /&gt;aa 1 ba&lt;BR /&gt;will lead to&lt;BR /&gt;aa 1 ba&lt;BR /&gt;yy    1    bb&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2007 07:04:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944701#M95392</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-02-15T07:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944702#M95393</link>
      <description>Hi Folks:&lt;BR /&gt;&lt;BR /&gt;I think my original post is indeed correct.  You can test with additional data as you please.&lt;BR /&gt;&lt;BR /&gt;I chuckled over how we all stumble reading dates of the form mm/dd [ or shouldn't that be dd/mm ? :-) ].</description>
      <pubDate>Thu, 15 Feb 2007 07:46:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944702#M95393</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-02-15T07:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944703#M95394</link>
      <description>&lt;BR /&gt;I figured out what the problem is. The date field is not in a consistent position in the file, sometimes it's field 8 and sometimes 9. &lt;BR /&gt;&lt;BR /&gt;That is,&lt;BR /&gt;&lt;BR /&gt;xxx xxx xxx xxx xxx xxx xxxx xxxx 02/11/07&lt;BR /&gt;xxx xxx xxx xxx xxx xxx xxxx 02/02/07&lt;BR /&gt;&lt;BR /&gt;So they don't sort right.&lt;BR /&gt;The only thing that I do know is that it's always the last field. I cannot think how to make awk or sort work on this.&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2007 09:32:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944703#M95394</guid>
      <dc:creator>dictum9</dc:creator>
      <dc:date>2007-02-15T09:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944704#M95395</link>
      <description>is the date always the last field?  If so, in awk you can print $NF.  &lt;BR /&gt;&lt;BR /&gt;That being the case, you can examine the "value" of nf and create a tmp file that either has dummy pad field added so the location is consistent, or prepend the date to the front of the line, sort it, then strip the prepended date, leaving you with the file in sort order in it's original format.</description>
      <pubDate>Thu, 15 Feb 2007 09:44:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944704#M95395</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2007-02-15T09:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944705#M95396</link>
      <description>Yes, date is always the last field. Are you saying I have to rewrite the file, sort it and then put it back? It has to be the last field and I need it as an input file for something else.&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2007 09:48:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944705#M95396</guid>
      <dc:creator>dictum9</dc:creator>
      <dc:date>2007-02-15T09:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944706#M95397</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I figured out what the problem is. The date field is not in a consistent position in the file, sometimes it's field 8 and sometimes 9.&lt;BR /&gt;&lt;BR /&gt;In that case, you need to leverage something other than the standard 'sort'.&lt;BR /&gt;&lt;BR /&gt;As Ralph noted, Perl could be used.&lt;BR /&gt;&lt;BR /&gt;Another solution is to filter your file and *pad* any records of less than nine fields with a bogus field-8.  Then use the standard 'sort' as I suggested.&lt;BR /&gt;&lt;BR /&gt;A very crude 'awk' filter like this might work:&lt;BR /&gt;&lt;BR /&gt;awk '{if (NF &amp;lt;9) {print $1,$2,3,$4,$5,$6,$7,"XXX",$NF} else {print}} file | sort ...&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF... &lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2007 09:48:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944706#M95397</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-02-15T09:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944707#M95398</link>
      <description>etc,&lt;BR /&gt;&lt;BR /&gt;Yes,&lt;BR /&gt;&lt;BR /&gt;a) rewrite to temp w/ the $NF prepended, followed by ALL of the data fields.&lt;BR /&gt;&lt;BR /&gt;b) sort the resulting temp file&lt;BR /&gt;&lt;BR /&gt;c) strip off the first field (added date), resulting in the file having its original form, but sorted. &lt;BR /&gt;&lt;BR /&gt;d)move this temp to the original location.&lt;BR /&gt;&lt;BR /&gt;this allows you to sort the file and still have the fields in the original layout for any subsequent processing&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2007 10:34:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944707#M95398</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2007-02-15T10:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944708#M95399</link>
      <description>something like:&lt;BR /&gt;&lt;BR /&gt;if ($NF = 8)&lt;BR /&gt; print $NF, $1,$2,$3,$4,$5,$6,$7,$8&lt;BR /&gt;else &lt;BR /&gt; print $NF, $1,$2,$3,$4,$5,$6,$7,$8,$9&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;that's the theory, syntax maybe off however&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2007 10:38:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944708#M95399</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2007-02-15T10:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list by a field</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944709#M95400</link>
      <description>Sounds like a job for AWK, a super utility!&lt;BR /&gt;&lt;BR /&gt;awk '{printf("%s|%s\n", $NF, $0)}' yourfile | sort -n | awk 'BEGIN{ FS="|"} {print $2}' &amp;gt; newfile&lt;BR /&gt;&lt;BR /&gt;Alfred&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2007 10:42:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sorting-a-list-by-a-field/m-p/3944709#M95400</guid>
      <dc:creator>Al Langen_1</dc:creator>
      <dc:date>2007-02-15T10:42:13Z</dc:date>
    </item>
  </channel>
</rss>

