<?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 command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528544#M867809</link>
    <description>for in `lanscan | awk '{print $5}' | grep -v Net | grep -v Name'&lt;BR /&gt;do&lt;BR /&gt;ifconfig ${i}&lt;BR /&gt;done</description>
    <pubDate>Tue, 15 May 2001 12:16:14 GMT</pubDate>
    <dc:creator>boley janowski</dc:creator>
    <dc:date>2001-05-15T12:16:14Z</dc:date>
    <item>
      <title>awk command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528542#M867807</link>
      <description>Hello all,&lt;BR /&gt;&lt;BR /&gt;I would like to write a script that would extract the 5th field using the awk command from  the lanscan command.  Then I would like to take that field and send it to the ifconfig command and send the output to the screen. Can someone show me how its done please. I kinda know you would have to do something like lanscan &amp;gt; awk '/lan/'.... Thank you for all your assistance.</description>
      <pubDate>Tue, 15 May 2001 12:09:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528542#M867807</guid>
      <dc:creator>sanjit</dc:creator>
      <dc:date>2001-05-15T12:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: awk command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528543#M867808</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;for X in `lanscan|awk 'NR&amp;gt;2 {print $5}'`&lt;BR /&gt;do&lt;BR /&gt;  ifconfig $X&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 15 May 2001 12:15:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528543#M867808</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-05-15T12:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: awk command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528544#M867809</link>
      <description>for in `lanscan | awk '{print $5}' | grep -v Net | grep -v Name'&lt;BR /&gt;do&lt;BR /&gt;ifconfig ${i}&lt;BR /&gt;done</description>
      <pubDate>Tue, 15 May 2001 12:16:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528544#M867809</guid>
      <dc:creator>boley janowski</dc:creator>
      <dc:date>2001-05-15T12:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: awk command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528545#M867810</link>
      <description>&lt;BR /&gt;for I in `lanscan|grep lan|awk '{ print $5 }'&lt;BR /&gt;do &lt;BR /&gt;ifconfig $I &lt;BR /&gt;done</description>
      <pubDate>Tue, 15 May 2001 12:25:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528545#M867810</guid>
      <dc:creator>Vincenzo Restuccia</dc:creator>
      <dc:date>2001-05-15T12:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: awk command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528546#M867811</link>
      <description>Hi James, thank you much for your help. One more thing, what does the NR&amp;gt;2 mean?</description>
      <pubDate>Tue, 15 May 2001 12:31:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528546#M867811</guid>
      <dc:creator>sanjit</dc:creator>
      <dc:date>2001-05-15T12:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: awk command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528547#M867812</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;The 'NR' variable is the current record count.  'awk' gives you this implicitly.  Thus, I am selecting records from the output of the 'lanscan' where the record number is greater then two (2).  As you know, this skips 'lanscan's headings.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 15 May 2001 12:36:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528547#M867812</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-05-15T12:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: awk command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528548#M867813</link>
      <description>The ordinal number of the current record from the start of input. Inside a BEGIN action the value is zero. Inside an END action the value is the number of the last record processed.</description>
      <pubDate>Tue, 15 May 2001 12:37:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528548#M867813</guid>
      <dc:creator>Vincenzo Restuccia</dc:creator>
      <dc:date>2001-05-15T12:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: awk command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528549#M867814</link>
      <description>Hi Sanjit&lt;BR /&gt;&lt;BR /&gt;Try this&lt;BR /&gt;&lt;BR /&gt;lanscan | awk '{print $5}' | grep lan &amp;gt;/tmp/x&lt;BR /&gt;for i in 'cat /tmp/x'&lt;BR /&gt;do&lt;BR /&gt;ifconfig $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava&lt;BR /&gt;</description>
      <pubDate>Tue, 15 May 2001 12:40:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528549#M867814</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2001-05-15T12:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: awk command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528550#M867815</link>
      <description>Here is the same but with only one line&lt;BR /&gt;&lt;BR /&gt;lanscan | awk 'NR&amp;gt;2{system("ifconfig "$5)}'</description>
      <pubDate>Wed, 16 May 2001 17:02:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-command/m-p/2528550#M867815</guid>
      <dc:creator>Eric Bramble</dc:creator>
      <dc:date>2001-05-16T17:02:36Z</dc:date>
    </item>
  </channel>
</rss>

