<?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 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701807#M901522</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Your original posting had comma's as field separators (hence the -t, argument). You new original file does not have comma's. That is why sort is 'not' working.</description>
    <pubDate>Thu, 11 Apr 2002 19:11:48 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2002-04-11T19:11:48Z</dc:date>
    <item>
      <title>sorting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701802#M901517</link>
      <description>Hi guys,&lt;BR /&gt;&lt;BR /&gt;For example, I have the following file:&lt;BR /&gt;&lt;BR /&gt;/dev/vg00,/dev/vg00/lvol1,0,25,0,0,0,22,2,100&lt;BR /&gt;/dev/vg00,/dev/vg00/lvol2,0,256,0,,0,0,2,1024&lt;BR /&gt;/dev/vg00,/dev/vg00/lvol3,0,38,0,0,1,1,2,152&lt;BR /&gt;/dev/vg00,/dev/vg00/lvol4,0,25,0,0,0,0,0,100&lt;BR /&gt;&lt;BR /&gt;I'd like to sort the above lines by # of stripes. It is field #8. (where you see 22)&lt;BR /&gt;&lt;BR /&gt;What is the best way to sort the above file, so I have no striped lvol (0) first followed by stripped ones?&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Thu, 11 Apr 2002 17:27:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701802#M901517</guid>
      <dc:creator>andi_1</dc:creator>
      <dc:date>2002-04-11T17:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: sorting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701803#M901518</link>
      <description>man sort&lt;BR /&gt;&lt;BR /&gt;sort -t, -k8 &lt;FILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;You can reverse the order with -r. -k is the field number (-k2 sorts by lvol)&lt;/FILENAME&gt;</description>
      <pubDate>Thu, 11 Apr 2002 17:32:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701803#M901518</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-04-11T17:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: sorting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701804#M901519</link>
      <description>try this:&lt;BR /&gt;&lt;BR /&gt;sort -t , -k 8 [filename]&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;mark</description>
      <pubDate>Thu, 11 Apr 2002 17:34:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701804#M901519</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2002-04-11T17:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: sorting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701805#M901520</link>
      <description># sort -t, -k8 &lt;FILE&gt;&lt;/FILE&gt;</description>
      <pubDate>Thu, 11 Apr 2002 17:39:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701805#M901520</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-04-11T17:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: sorting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701806#M901521</link>
      <description>Hi guys,&lt;BR /&gt;&lt;BR /&gt;Here is my original file:&lt;BR /&gt;&lt;BR /&gt;1 2 /dev/vg00 /dev/vg00/lvol2 0 256 0 0 0 1 2 1024&lt;BR /&gt;1 09 /dev/vgsys /dev/vgsys/lvm 0 125 0 25 0 0 0 1000&lt;BR /&gt;1 10 /dev/vgsys /dev/vgsys/lvk 0 125 0 0 0 0 0 1000&lt;BR /&gt;1 11 /dev/vgsys /dev/vgsys/lvp 0 125 0 4 0 0 0 1000&lt;BR /&gt;1 12 /dev/vgsys /dev/vgsys/lvs 0 125 0 0 0 0 0 1000&lt;BR /&gt;1 13 /dev/vgsys /dev/vgsys/lvu 0 50 0 4 0 0 0 400&lt;BR /&gt;&lt;BR /&gt;# sort -t, -r k 8 tmp &amp;gt; tmpSorted&lt;BR /&gt;&lt;BR /&gt;Here is sorted output:&lt;BR /&gt;1 13 /dev/vgsys /dev/vgsys/lvu 0 50 0 4 0 0 0 400&lt;BR /&gt;1 12 /dev/vgsys /dev/vgsys/lvs 0 125 0 0 0 0 0 1000&lt;BR /&gt;1 11 /dev/vgsys /dev/vgsys/lvp 0 125 0 4 0 0 0 1000&lt;BR /&gt;1 10 /dev/vgsys /dev/vgsys/lvk 0 125 0 0 0 0 0 1000&lt;BR /&gt;1 09 /dev/vgsys /dev/vgsys/lvm 0 125 0 25 0 0 0 1000&lt;BR /&gt;1 02 /dev/vg00 /dev/vg00/lvol2 0 256 0 0 0 1 2 1024&lt;BR /&gt;&lt;BR /&gt;Doesn't seem to sort?&lt;BR /&gt;&lt;BR /&gt;Any ideas why?&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Apr 2002 19:07:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701806#M901521</guid>
      <dc:creator>andi_1</dc:creator>
      <dc:date>2002-04-11T19:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: sorting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701807#M901522</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Your original posting had comma's as field separators (hence the -t, argument). You new original file does not have comma's. That is why sort is 'not' working.</description>
      <pubDate>Thu, 11 Apr 2002 19:11:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701807#M901522</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-04-11T19:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: sorting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701808#M901523</link>
      <description>Hi Leon:&lt;BR /&gt;&lt;BR /&gt;Your representation of the data originally showed the field delimiter being a comma (',') and hence the '-t,' option was specified to 'sort'.  Therefore, if you input is comma delimited, use '-t,' but if it is space delimited as you show, drop the '-t,' option from the sort specification.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 11 Apr 2002 19:14:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701808#M901523</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-04-11T19:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: sorting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701809#M901524</link>
      <description>Hi Leon,&lt;BR /&gt;&lt;BR /&gt;As Clay suggested, the -t is used to specify the 'character' in the input file.&lt;BR /&gt;&lt;BR /&gt;If you don't have the ',' in the file, then use:&lt;BR /&gt;&lt;BR /&gt;# sort -r -k3 file_name&lt;BR /&gt;&lt;BR /&gt;If you don't use -t it will assume the 'character' as blank.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Shiju</description>
      <pubDate>Thu, 11 Apr 2002 19:19:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701809#M901524</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2002-04-11T19:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: sorting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701810#M901525</link>
      <description>oops ..it should be:&lt;BR /&gt;&lt;BR /&gt;# sort -r -k8 tmp &amp;gt; tmpsorted&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Shiju&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Apr 2002 19:23:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sorting/m-p/2701810#M901525</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2002-04-11T19:23:50Z</dc:date>
    </item>
  </channel>
</rss>

