<?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: separate out the column in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696536#M248481</link>
    <description>Seperate it by space first and then by :&lt;BR /&gt;ps -ef|grep telnet | awk -F " " '{print $whatyouwant}'|awk -F : ' {print $whatyouwant}'</description>
    <pubDate>Thu, 22 Dec 2005 04:26:31 GMT</pubDate>
    <dc:creator>RAC_1</dc:creator>
    <dc:date>2005-12-22T04:26:31Z</dc:date>
    <item>
      <title>separate out the column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696532#M248477</link>
      <description>I know "awk -F:" will separate out the column by ":" ,  now if I what to separate out the column by space also , what can I do ?&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;for example :&lt;BR /&gt;&lt;BR /&gt;#ps -ef |grep telnet &lt;BR /&gt;root     10159   702  0 15:45 ?        00:00:00 in.telnetd: 192.168.0.1&lt;BR /&gt;&lt;BR /&gt;how to separate out the column so that the column as below,&lt;BR /&gt;&lt;BR /&gt;column 1  --&amp;gt; root&lt;BR /&gt;column 2  --&amp;gt; 10159&lt;BR /&gt;column 3  --&amp;gt; 702&lt;BR /&gt;column 4  --&amp;gt; 0 &lt;BR /&gt;column 5  --&amp;gt; 15&lt;BR /&gt;column 6  --&amp;gt; 45&lt;BR /&gt;column 7  --&amp;gt; ? &lt;BR /&gt;column 8  --&amp;gt; 00 &lt;BR /&gt;column 9  --&amp;gt; 00 &lt;BR /&gt;column 10  --&amp;gt; 00 &lt;BR /&gt;column 11 --&amp;gt; in.telnetd&lt;BR /&gt;column 12 --&amp;gt; 192.168.0.1&lt;BR /&gt;&lt;BR /&gt;|awk {print $12} then output the result is 192.168.0.1</description>
      <pubDate>Thu, 22 Dec 2005 03:17:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696532#M248477</guid>
      <dc:creator>hanyyu1</dc:creator>
      <dc:date>2005-12-22T03:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: separate out the column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696533#M248478</link>
      <description>ps -ef |grep telnet | awk -f " " '{print $whatyouwant}'</description>
      <pubDate>Thu, 22 Dec 2005 03:30:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696533#M248478</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-12-22T03:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: separate out the column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696534#M248479</link>
      <description>ps -ef|grep -i telnet |awk 'BEGIN { FS = "[ \t\n]+" }{ print $x }'&lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Thu, 22 Dec 2005 03:33:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696534#M248479</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2005-12-22T03:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: separate out the column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696535#M248480</link>
      <description>thx replies ,&lt;BR /&gt;&lt;BR /&gt;may be my question is not clear , what I want is to separate the column , to let the column is separate by : and space at the same time like my above example , is it possible ? thx</description>
      <pubDate>Thu, 22 Dec 2005 03:47:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696535#M248480</guid>
      <dc:creator>hanyyu1</dc:creator>
      <dc:date>2005-12-22T03:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: separate out the column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696536#M248481</link>
      <description>Seperate it by space first and then by :&lt;BR /&gt;ps -ef|grep telnet | awk -F " " '{print $whatyouwant}'|awk -F : ' {print $whatyouwant}'</description>
      <pubDate>Thu, 22 Dec 2005 04:26:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696536#M248481</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-12-22T04:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: separate out the column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696537#M248482</link>
      <description>First split with -F" " that is default one. Then split with split() in awk as,&lt;BR /&gt;&lt;BR /&gt;echo "root 10159 702 0 15:45 ? 00:00:00 in.telnetd: 192.168.0.1" | awk '{ split($5,a,":");split($7,b,":");print $1,$2,$3,$4,a[1],a[2],$6,b[1],b[2],b[3],$8,$9,$10,$11,$12; }'&lt;BR /&gt;&lt;BR /&gt;-Muthu</description>
      <pubDate>Thu, 22 Dec 2005 04:29:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696537#M248482</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-12-22T04:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: separate out the column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696538#M248483</link>
      <description>Another way as,&lt;BR /&gt;&lt;BR /&gt;# ps -ef | grep 'telnet' |  perl -an -F/:/ -e 'BEGIN{$,=" ";}{print @F;}'&lt;BR /&gt;&lt;BR /&gt;-Muthu</description>
      <pubDate>Thu, 22 Dec 2005 04:37:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696538#M248483</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-12-22T04:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: separate out the column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696539#M248484</link>
      <description>ps -ef | grep "telnet"|awk -F " " '{print $x }'|awk -F : ' {print $x}'&lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Thu, 22 Dec 2005 04:44:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696539#M248484</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2005-12-22T04:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: separate out the column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696540#M248485</link>
      <description>The -F option of awk allows for a regular expression, so you could use-&lt;BR /&gt; &lt;BR /&gt;ps -ef | grep telnet | awk -F"[ :]" '{print $12}'&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Thu, 22 Dec 2005 10:26:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696540#M248485</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2005-12-22T10:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: separate out the column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696541#M248486</link>
      <description>echo "root 10159 702 0 15:45 ? 00:00:00 in.telnetd: 192.168.0.1" | awk '{ print $1,"\n",$2,"\n",$3,"\n",$4,"\n",$5,"\n",$6,"\n",$7,"&lt;BR /&gt;\n",$8,"\n",$9,"\n",$10,"\n",$11,"\n",$12; }'&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Dec 2005 11:03:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696541#M248486</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2005-12-22T11:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: separate out the column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696542#M248487</link>
      <description>thx replies,&lt;BR /&gt;&lt;BR /&gt;I tried the below script , but it will separate the column by space THEN seperate by : ,  if I want it will seperate by both space  and : , what can I do ? thx&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ps -ef | grep "telnet"|awk -F " " '{print $x }'|awk -F : ' {print $x}'&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Dec 2005 02:05:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696542#M248487</guid>
      <dc:creator>hanyyu1</dc:creator>
      <dc:date>2005-12-23T02:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: separate out the column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696543#M248488</link>
      <description>You can not use two delimiters with -F option awk at one time. Select one delimiter and split it again with the next delimiter. &lt;BR /&gt;&lt;BR /&gt;-Muthu&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Dec 2005 02:47:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/separate-out-the-column/m-p/3696543#M248488</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-12-23T02:47:59Z</dc:date>
    </item>
  </channel>
</rss>

