<?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: awk hack in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/awk-hack/m-p/5114239#M91822</link>
    <description>ok nice one James - thanks again</description>
    <pubDate>Tue, 17 Jun 2008 13:31:50 GMT</pubDate>
    <dc:creator>lawrenzo_1</dc:creator>
    <dc:date>2008-06-17T13:31:50Z</dc:date>
    <item>
      <title>awk hack</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-hack/m-p/5114236#M91819</link>
      <description>Hello all,&lt;BR /&gt;&lt;BR /&gt;I have written a bit of a hack but am sure I can get the desired output within one statement:&lt;BR /&gt;&lt;BR /&gt;# netstat -rn |awk '/default/ {IP = $2};END{print IP}'|awk -F"." '{print $1"."$2}'&lt;BR /&gt;&lt;BR /&gt;172.20&lt;BR /&gt;&lt;BR /&gt;what is the best syntax for running this with one awk?&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Tue, 17 Jun 2008 11:53:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-hack/m-p/5114236#M91819</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2008-06-17T11:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: awk hack</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-hack/m-p/5114237#M91820</link>
      <description>Hi Chris:&lt;BR /&gt;&lt;BR /&gt;# netstat -rn |awk '/default/ {split($2,a,".");print a[1]"."a[2]}'&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 17 Jun 2008 12:01:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-hack/m-p/5114237#M91820</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-06-17T12:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: awk hack</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-hack/m-p/5114238#M91821</link>
      <description>HI (again) Chris:&lt;BR /&gt;&lt;BR /&gt;It's worth remembering that you can set your output record seperator to write the solution thusly, too:&lt;BR /&gt;&lt;BR /&gt;# netstat -rn |awk 'BEGIN{OFS="."};/default/ {split($2,a,".");print a[1],a[2]}'&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 17 Jun 2008 12:14:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-hack/m-p/5114238#M91821</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-06-17T12:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: awk hack</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-hack/m-p/5114239#M91822</link>
      <description>ok nice one James - thanks again</description>
      <pubDate>Tue, 17 Jun 2008 13:31:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-hack/m-p/5114239#M91822</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2008-06-17T13:31:50Z</dc:date>
    </item>
  </channel>
</rss>

