<?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: Field seperator help in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775477#M102198</link>
    <description>HI Chan,&lt;BR /&gt;&lt;BR /&gt;I suppose u mean $7 :)&lt;BR /&gt;&lt;BR /&gt;OK the thing is, somehow for below output&lt;BR /&gt;&lt;BR /&gt;51% (13%)    0% ( 0%)  Apr 20 19:03  backup &lt;BR /&gt;&lt;BR /&gt;$7 will be "20" instead of "Apr", I think the '51' field has some tricky stuff there making it NOT generic to use awk...&lt;BR /&gt;&lt;BR /&gt;Bgds,&lt;BR /&gt;Gordon</description>
    <pubDate>Fri, 21 Apr 2006 04:51:05 GMT</pubDate>
    <dc:creator>Gordon_3</dc:creator>
    <dc:date>2006-04-21T04:51:05Z</dc:date>
    <item>
      <title>Field seperator help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775475#M102196</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;Suppose get below output:&lt;BR /&gt;&lt;BR /&gt;  0% ( 0%)    0% ( 0%)  Apr 20 19:04  backup         &lt;BR /&gt;  1% ( 0%)    0% ( 0%)  Apr 20 19:04  backup         &lt;BR /&gt;&lt;BR /&gt;How can I get the field of "Apr" in the script? I try awk , but seems not a good solution as it may go to "20" in some case..Thx.&lt;BR /&gt;&lt;BR /&gt;Bgds,&lt;BR /&gt;Gordon</description>
      <pubDate>Fri, 21 Apr 2006 04:42:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775475#M102196</guid>
      <dc:creator>Gordon_3</dc:creator>
      <dc:date>2006-04-21T04:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Field seperator help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775476#M102197</link>
      <description>Hi Gordon,&lt;BR /&gt;&lt;BR /&gt;Have you tried,&lt;BR /&gt;&lt;BR /&gt;if the name of the file is test&lt;BR /&gt;&lt;BR /&gt;cat test|awk '{print $5}'&lt;BR /&gt;&lt;BR /&gt;I assume you have only 4 spaces &lt;BR /&gt;&lt;BR /&gt;Chan</description>
      <pubDate>Fri, 21 Apr 2006 04:47:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775476#M102197</guid>
      <dc:creator>Chan 007</dc:creator>
      <dc:date>2006-04-21T04:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Field seperator help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775477#M102198</link>
      <description>HI Chan,&lt;BR /&gt;&lt;BR /&gt;I suppose u mean $7 :)&lt;BR /&gt;&lt;BR /&gt;OK the thing is, somehow for below output&lt;BR /&gt;&lt;BR /&gt;51% (13%)    0% ( 0%)  Apr 20 19:03  backup &lt;BR /&gt;&lt;BR /&gt;$7 will be "20" instead of "Apr", I think the '51' field has some tricky stuff there making it NOT generic to use awk...&lt;BR /&gt;&lt;BR /&gt;Bgds,&lt;BR /&gt;Gordon</description>
      <pubDate>Fri, 21 Apr 2006 04:51:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775477#M102198</guid>
      <dc:creator>Gordon_3</dc:creator>
      <dc:date>2006-04-21T04:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Field seperator help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775478#M102199</link>
      <description>Gordon,&lt;BR /&gt;the problem is the number of spaces.&lt;BR /&gt;If you have a fixed number of spaces&lt;BR /&gt;echo "0% ( 0%) 0% ( 0%) Apr 20 19:04 backup" | cut -d' ' -f7&lt;BR /&gt;or&lt;BR /&gt;If you have a fixed length for each field&lt;BR /&gt;echo "0% ( 0%) 0% ( 0%) Apr 20 19:04 backup" | cut -c19-22</description>
      <pubDate>Fri, 21 Apr 2006 04:54:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775478#M102199</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-04-21T04:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Field seperator help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775479#M102200</link>
      <description>Ok some correction, it's due to 13%, coz it fill up all space there and so awk treat that 1 field instead of 2 field... so that's why awk 'not' generic here</description>
      <pubDate>Fri, 21 Apr 2006 04:54:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775479#M102200</guid>
      <dc:creator>Gordon_3</dc:creator>
      <dc:date>2006-04-21T04:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Field seperator help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775480#M102201</link>
      <description>Thx peter, seems using character count can deal with this problem effectively !</description>
      <pubDate>Fri, 21 Apr 2006 04:57:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775480#M102201</guid>
      <dc:creator>Gordon_3</dc:creator>
      <dc:date>2006-04-21T04:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Field seperator help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775481#M102202</link>
      <description>Hi Gordon:&lt;BR /&gt;&lt;BR /&gt;This will extract the field "Apr" (or any three character month) from the format you show:&lt;BR /&gt;&lt;BR /&gt;# perl -nle 'print $1 if /^\d+%.+\)\s+(...)/' file&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 21 Apr 2006 05:15:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775481#M102202</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-04-21T05:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Field seperator help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775482#M102203</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Another way to use awk is to 'count backward', as it seems the first fields are not always equal in length.&lt;BR /&gt;&lt;BR /&gt;awk '{print $(NF-3)}' test&lt;BR /&gt;&lt;BR /&gt;if your file is called 'test'&lt;BR /&gt;&lt;BR /&gt;Greetings,&lt;BR /&gt;Philippe</description>
      <pubDate>Mon, 24 Apr 2006 04:53:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/field-seperator-help/m-p/3775482#M102203</guid>
      <dc:creator>Philippe Vervoort</dc:creator>
      <dc:date>2006-04-24T04:53:15Z</dc:date>
    </item>
  </channel>
</rss>

