<?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: sort help in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/sort-help/m-p/4057363#M94443</link>
    <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;From my new memory leak monitor.&lt;BR /&gt;&lt;BR /&gt; CL="ps -o pid,args,sz,vsz | sort -nr -k 3,4| head -$NUM"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This sorts by field three then field 4.&lt;BR /&gt;&lt;BR /&gt;All you need to do is get the field separator right.&lt;BR /&gt;&lt;BR /&gt;I would suggest a combination of awk and sort.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
    <pubDate>Tue, 21 Aug 2007 02:16:45 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2007-08-21T02:16:45Z</dc:date>
    <item>
      <title>sort help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sort-help/m-p/4057362#M94442</link>
      <description>Hi experts,&lt;BR /&gt;&lt;BR /&gt;I have a comma separated file.&lt;BR /&gt;The fourth field in the file is date of the form: DD-MON-YYYY format.&lt;BR /&gt;I wanted the file sorted according to the fourth field.&lt;BR /&gt;DD : 01-31&lt;BR /&gt;sort -knr4 wont work.&lt;BR /&gt;sort +3 -4 also dint work..&lt;BR /&gt;&lt;BR /&gt;Please help.</description>
      <pubDate>Tue, 21 Aug 2007 02:10:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sort-help/m-p/4057362#M94442</guid>
      <dc:creator>Rinky</dc:creator>
      <dc:date>2007-08-21T02:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: sort help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sort-help/m-p/4057363#M94443</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;From my new memory leak monitor.&lt;BR /&gt;&lt;BR /&gt; CL="ps -o pid,args,sz,vsz | sort -nr -k 3,4| head -$NUM"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This sorts by field three then field 4.&lt;BR /&gt;&lt;BR /&gt;All you need to do is get the field separator right.&lt;BR /&gt;&lt;BR /&gt;I would suggest a combination of awk and sort.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 21 Aug 2007 02:16:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sort-help/m-p/4057363#M94443</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-08-21T02:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: sort help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sort-help/m-p/4057364#M94444</link>
      <description>&amp;gt;I wanted the file sorted according to the fourth field.&lt;BR /&gt;&lt;BR /&gt;You need to break up the fourth field into 3 fields with "." syntax.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;SEP: I would suggest a combination of awk and sort.&lt;BR /&gt;&lt;BR /&gt;No need, sort(1) has enough horsepower:&lt;BR /&gt;sort -t, -k4.8n,4.11n -k4.4M,4.6M -k4.1n,4.2n file&lt;BR /&gt;&lt;BR /&gt;Use the "." notation to get bytes within field 4.  Use "M" to sort by months.</description>
      <pubDate>Tue, 21 Aug 2007 02:31:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sort-help/m-p/4057364#M94444</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-08-21T02:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: sort help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sort-help/m-p/4057365#M94445</link>
      <description>Thanks Dennis..&lt;BR /&gt;It worked exactly as I wanted...</description>
      <pubDate>Tue, 21 Aug 2007 02:57:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sort-help/m-p/4057365#M94445</guid>
      <dc:creator>Rinky</dc:creator>
      <dc:date>2007-08-21T02:57:38Z</dc:date>
    </item>
  </channel>
</rss>

