<?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 Help Needed in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083035#M92706</link>
    <description>Replace the for loop with a while loop as in:&lt;BR /&gt;&lt;BR /&gt;lanscan | awk '/[0-9]/{print $3, $2}' | while read i&lt;BR /&gt;do&lt;BR /&gt;linkloop -i $i&lt;BR /&gt;done</description>
    <pubDate>Wed, 05 Dec 2007 19:44:28 GMT</pubDate>
    <dc:creator>Sandman!</dc:creator>
    <dc:date>2007-12-05T19:44:28Z</dc:date>
    <item>
      <title>AWK Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083030#M92701</link>
      <description>Hello masters of scripting,&lt;BR /&gt;&lt;BR /&gt;I am trying do a small script that will do linkloop tests on interfaces, and I need your help.  &lt;BR /&gt;&lt;BR /&gt;Here is a sample output of just a bare lanscan (minus a few interfaces):&lt;BR /&gt;&lt;BR /&gt;lanscan&lt;BR /&gt;Hardware Station        Crd Hdw   Net-Interface  NM  MAC       HP-DLPI DLPI&lt;BR /&gt;Path     Address        In# State NamePPA        ID  Type      Support Mjr#&lt;BR /&gt;0/5/1/0/4/0 0x001A4BF56734 2   UP    lan2 snap2     1   ETHER     Yes     119&lt;BR /&gt;0/5/1/0/4/1 0x001A4BF56735 3   UP    lan3 snap3     2   ETHER     Yes     119&lt;BR /&gt;&lt;BR /&gt;I thought I was on to something when I was able to get the following formated output:&lt;BR /&gt;&lt;BR /&gt;# lanscan | grep -v Hardware | grep -v Path | awk '{print $3, $2}'&lt;BR /&gt;2 0x001A4BF56734&lt;BR /&gt;3 0x001A4BF56735&lt;BR /&gt;4 0x001A4BF56736&lt;BR /&gt;5 0x001A4BF56737&lt;BR /&gt;6 0x001A4BF56394&lt;BR /&gt;7 0x001A4BF56395&lt;BR /&gt;8 0x001A4BF56396&lt;BR /&gt;9 0x001A4BF56397&lt;BR /&gt;0 0x001A4B0766B6&lt;BR /&gt;1 0x001A4B0766B7&lt;BR /&gt;&lt;BR /&gt;And then I put the output into a for loop, and it falls apart:&lt;BR /&gt;&lt;BR /&gt;for i in `lanscan | grep -v Hardware | grep -v Path | awk '{print $3, $2}'`&lt;BR /&gt;do&lt;BR /&gt;echo linkloop $i&lt;BR /&gt;done&lt;BR /&gt;linkloop 2&lt;BR /&gt;linkloop 0x001A4BF56734&lt;BR /&gt;linkloop 3&lt;BR /&gt;linkloop 0x001A4BF56735&lt;BR /&gt;linkloop 4&lt;BR /&gt;linkloop 0x001A4BF56736&lt;BR /&gt;linkloop 5&lt;BR /&gt;linkloop 0x001A4BF56737&lt;BR /&gt;linkloop 6&lt;BR /&gt;linkloop 0x001A4BF56394&lt;BR /&gt;linkloop 7&lt;BR /&gt;linkloop 0x001A4BF56395&lt;BR /&gt;linkloop 8&lt;BR /&gt;linkloop 0x001A4BF56396&lt;BR /&gt;linkloop 9&lt;BR /&gt;linkloop 0x001A4BF56397&lt;BR /&gt;linkloop 0&lt;BR /&gt;linkloop 0x001A4B0766B6&lt;BR /&gt;linkloop 1&lt;BR /&gt;linkloop 0x001A4B0766B7&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please help.</description>
      <pubDate>Wed, 05 Dec 2007 19:20:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083030#M92701</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2007-12-05T19:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083031#M92702</link>
      <description>linkloop works on the link address, or mac address, or the card, so your extraneous information (the INT #, field 3) is useless.&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;&lt;BR /&gt;for INT in $(lanscan | grep -v -e Hardware -e Path | awk '{print $3}')&lt;BR /&gt;do&lt;BR /&gt;echo linkloop ${INT}&lt;BR /&gt;done</description>
      <pubDate>Wed, 05 Dec 2007 19:25:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083031#M92702</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2007-12-05T19:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083032#M92703</link>
      <description>this will do the trick:&lt;BR /&gt;for i in `netstat -in|grep -vE "lo0|Name|lan[0-9*]:"|awk '{print substr($0,4,6)}'`&lt;BR /&gt;do&lt;BR /&gt;        echo $i | grep -q 90[0-9]&lt;BR /&gt;        if [[ $? -eq 0 ]]; then&lt;BR /&gt;                for j in `lanscan -q | grep $i`&lt;BR /&gt;                do      &lt;BR /&gt;                        linkloop -i $i `yes|lanadmin -g $j | grep "Station Address" | awk '{print $4}'` 2&amp;gt;&amp;amp;1 | grep -q "OK" &amp;amp;&amp;amp; echo "lan$j is OK" || echo "lan$j is NOT OK"&lt;BR /&gt;                done    &lt;BR /&gt;        else    &lt;BR /&gt;                linkloop -i $i `lanadmin -g $i | grep "Station Address" | awk '{print $4}'` 2&amp;gt;&amp;amp;1 | grep -q "OK" &amp;amp;&amp;amp; echo "lan$i is OK" || echo "lan$i is NOT OK"&lt;BR /&gt;        fi      &lt;BR /&gt;done</description>
      <pubDate>Wed, 05 Dec 2007 19:26:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083032#M92703</guid>
      <dc:creator>F Verschuren</dc:creator>
      <dc:date>2007-12-05T19:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083033#M92704</link>
      <description>Sorry folks.  &lt;BR /&gt;This:&lt;BR /&gt;&lt;BR /&gt;for i in `lanscan | grep -v Hardware | grep -v Path | awk '{print $3, $2}'`&lt;BR /&gt;do&lt;BR /&gt;echo linkloop $i&lt;BR /&gt;done&lt;BR /&gt;linkloop 2&lt;BR /&gt;linkloop 0x001A4BF56734&lt;BR /&gt;linkloop 3&lt;BR /&gt;linkloop 0x001A4BF56735&lt;BR /&gt;linkloop 4&lt;BR /&gt;linkloop 0x001A4BF56736&lt;BR /&gt;linkloop 5&lt;BR /&gt;linkloop 0x001A4BF56737&lt;BR /&gt;linkloop 6&lt;BR /&gt;linkloop 0x001A4BF56394&lt;BR /&gt;linkloop 7&lt;BR /&gt;linkloop 0x001A4BF56395&lt;BR /&gt;linkloop 8&lt;BR /&gt;linkloop 0x001A4BF56396&lt;BR /&gt;linkloop 9&lt;BR /&gt;linkloop 0x001A4BF56397&lt;BR /&gt;linkloop 0&lt;BR /&gt;linkloop 0x001A4B0766B6&lt;BR /&gt;linkloop 1&lt;BR /&gt;linkloop 0x001A4B0766B7&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Should be:&lt;BR /&gt;&lt;BR /&gt;for i in `lanscan | grep -v Hardware | grep -v Path | awk '{print $3, $2}'`&lt;BR /&gt;do&lt;BR /&gt;echo linkloop -i $i&lt;BR /&gt;done&lt;BR /&gt;linkloop -i 2&lt;BR /&gt;linkloop -i 0x001A4BF56734&lt;BR /&gt;linkloop -i 3&lt;BR /&gt;linkloop -i 0x001A4BF56735&lt;BR /&gt;linkloop -i 4&lt;BR /&gt;linkloop -i 0x001A4BF56736&lt;BR /&gt;linkloop -i 5&lt;BR /&gt;linkloop -i 0x001A4BF56737&lt;BR /&gt;linkloop -i 6&lt;BR /&gt;linkloop -i 0x001A4BF56394&lt;BR /&gt;linkloop -i 7&lt;BR /&gt;linkloop -i 0x001A4BF56395&lt;BR /&gt;linkloop -i 8&lt;BR /&gt;linkloop -i 0x001A4BF56396&lt;BR /&gt;linkloop -i 9&lt;BR /&gt;linkloop -i 0x001A4BF56397&lt;BR /&gt;linkloop -i 0&lt;BR /&gt;linkloop -i 0x001A4B0766B6&lt;BR /&gt;linkloop -i 1&lt;BR /&gt;linkloop -i 0x001A4B0766B7&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Dec 2007 19:31:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083033#M92704</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2007-12-05T19:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083034#M92705</link>
      <description>my last post just checks the configgured lans..&lt;BR /&gt;you need:&lt;BR /&gt;lanscan | awk '{ print $3 " " $2 }'|grep -v -e Sta -e Add |while read line&lt;BR /&gt;do&lt;BR /&gt;linkloop -i $line&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;so you awk you heve to replease the , whit " ".&lt;BR /&gt;&lt;BR /&gt;The rest was fine...</description>
      <pubDate>Wed, 05 Dec 2007 19:32:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083034#M92705</guid>
      <dc:creator>F Verschuren</dc:creator>
      <dc:date>2007-12-05T19:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083035#M92706</link>
      <description>Replace the for loop with a while loop as in:&lt;BR /&gt;&lt;BR /&gt;lanscan | awk '/[0-9]/{print $3, $2}' | while read i&lt;BR /&gt;do&lt;BR /&gt;linkloop -i $i&lt;BR /&gt;done</description>
      <pubDate>Wed, 05 Dec 2007 19:44:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083035#M92706</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-12-05T19:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083036#M92707</link>
      <description>&lt;!--!*#--&gt;Hi Patrick:&lt;BR /&gt;&lt;BR /&gt;Perhaps:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;LANS=$(lanscan | awk '!/Hardware|Path/ {print $3":"$2}' )&lt;BR /&gt;for LAN in ${LANS}&lt;BR /&gt;do&lt;BR /&gt;    LNBR=$(echo ${LAN} | cut -d: -f1)&lt;BR /&gt;    echo "LAN #${LNBR}"&lt;BR /&gt;    LINK=$(echo ${LAN} | cut -d: -f2)&lt;BR /&gt;    linkloop ${LINK}&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;...The most important point is NOT to use 'grep' whwn 'awk' is designed to pattern match.  Avoid the useless, extra process!&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 05 Dec 2007 19:51:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083036#M92707</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-12-05T19:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083037#M92708</link>
      <description>Thanks all.  Here is what I went with:&lt;BR /&gt;&lt;BR /&gt;lanscan | awk '/[0-9]/{print $3, $2}' | while read i&lt;BR /&gt;do&lt;BR /&gt;echo linkloop -i $i&lt;BR /&gt;echo "----------------------"&lt;BR /&gt;linkloop -i $i&lt;BR /&gt;echo&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The output:&lt;BR /&gt;&lt;BR /&gt;linkloop -i 0 0x00306E13F682&lt;BR /&gt;----------------------&lt;BR /&gt;Link connectivity to LAN station: 0x00306E13F682&lt;BR /&gt;error:  expected primitive 0x30, got DL_ERROR_ACK&lt;BR /&gt;   dl_error_primitive = 0x2d&lt;BR /&gt;   dl_errno = 0x04&lt;BR /&gt;   dl_unix_errno = 57&lt;BR /&gt;error - did not receive data part of message&lt;BR /&gt;&lt;BR /&gt;linkloop -i 2 0x00306E0C541F&lt;BR /&gt;----------------------&lt;BR /&gt;Link connectivity to LAN station: 0x00306E0C541F&lt;BR /&gt; -- OK&lt;BR /&gt;&lt;BR /&gt;linkloop -i 3 0x00306E38D363&lt;BR /&gt;----------------------&lt;BR /&gt;Link connectivity to LAN station: 0x00306E38D363&lt;BR /&gt; -- OK&lt;BR /&gt;&lt;BR /&gt;linkloop -i 1 0x00306E21D5B7&lt;BR /&gt;----------------------&lt;BR /&gt;Link connectivity to LAN station: 0x00306E21D5B7&lt;BR /&gt; -- OK&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Dec 2007 19:55:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083037#M92708</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2007-12-05T19:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083038#M92709</link>
      <description>lanscan | awk '/[0-9]/{print $3, $2}' | while read i&lt;BR /&gt;do&lt;BR /&gt;echo linkloop -i $i&lt;BR /&gt;echo "----------------------"&lt;BR /&gt;linkloop -i $i&lt;BR /&gt;echo&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Dec 2007 20:04:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083038#M92709</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2007-12-05T20:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083039#M92710</link>
      <description>Final Solution:&lt;BR /&gt;&lt;BR /&gt;lanscan | awk '/[0-9]/{print $3, $2}' | while read i&lt;BR /&gt;do&lt;BR /&gt;echo LAN `echo $i | awk '{print $1}'`&lt;BR /&gt;echo linkloop -i $i&lt;BR /&gt;echo "----------------------"&lt;BR /&gt;linkloop -i $i&lt;BR /&gt;echo&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Output:&lt;BR /&gt;&lt;BR /&gt;LAN 0&lt;BR /&gt;linkloop -i 0 0x00306E13F682&lt;BR /&gt;----------------------&lt;BR /&gt;Link connectivity to LAN station: 0x00306E13F682&lt;BR /&gt;error:  expected primitive 0x30, got DL_ERROR_ACK&lt;BR /&gt;   dl_error_primitive = 0x2d&lt;BR /&gt;   dl_errno = 0x04&lt;BR /&gt;   dl_unix_errno = 57&lt;BR /&gt;error - did not receive data part of message&lt;BR /&gt;&lt;BR /&gt;LAN 2&lt;BR /&gt;linkloop -i 2 0x00306E0C541F&lt;BR /&gt;----------------------&lt;BR /&gt;Link connectivity to LAN station: 0x00306E0C541F&lt;BR /&gt; -- OK&lt;BR /&gt;&lt;BR /&gt;LAN 3&lt;BR /&gt;linkloop -i 3 0x00306E38D363&lt;BR /&gt;----------------------&lt;BR /&gt;Link connectivity to LAN station: 0x00306E38D363&lt;BR /&gt; -- OK&lt;BR /&gt;&lt;BR /&gt;LAN 1&lt;BR /&gt;linkloop -i 1 0x00306E21D5B7&lt;BR /&gt;----------------------&lt;BR /&gt;Link connectivity to LAN station: 0x00306E21D5B7&lt;BR /&gt; -- OK&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Dec 2007 20:26:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083039#M92710</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2007-12-05T20:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083040#M92711</link>
      <description>&lt;!--!*#--&gt;Hi (again) Patrick:&lt;BR /&gt;&lt;BR /&gt;Think optimization and reduce this to one 'awk' process:&lt;BR /&gt;&lt;BR /&gt;# cat ./mylans&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;LANS=$(lanscan | awk 'NR&amp;gt;2 {print $3":"$2}' )&lt;BR /&gt;for LAN in ${LANS}&lt;BR /&gt;do&lt;BR /&gt;    LNBR=${LAN%%:*}&lt;BR /&gt;    LINK=${LAN##*:}&lt;BR /&gt;    echo "\nlinkloop -i ${LNBR} ${LINK}\n----------------------"&lt;BR /&gt;    linkloop ${LINK}&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;# ./mylans&lt;BR /&gt;&lt;BR /&gt;linkloop -i 0 0x080009D97070&lt;BR /&gt;----------------------&lt;BR /&gt;Link connectivity to LAN station: 0x080009D97070&lt;BR /&gt; -- OK&lt;BR /&gt;&lt;BR /&gt;linkloop -i 1 0x0060B083C26C&lt;BR /&gt;----------------------&lt;BR /&gt;Link connectivity to LAN station: 0x0060B083C26C&lt;BR /&gt;error:  get_msg2 getmsg failed, errno = 4&lt;BR /&gt; -- FAILED&lt;BR /&gt;    frames sent               : 1&lt;BR /&gt;    frames received correctly : 0&lt;BR /&gt;    reads that timed out   &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Dec 2007 20:47:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083040#M92711</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-12-05T20:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083041#M92712</link>
      <description>James,&lt;BR /&gt;&lt;BR /&gt;Whenever I run your script on my server, there are no lan interfaces that come back ok. I get the following:&lt;BR /&gt;&lt;BR /&gt;root@server:/&amp;gt; cat linkloop_test1&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;LANS=$(lanscan | awk 'NR&amp;gt;2 {print $3":"$2}' )&lt;BR /&gt;for LAN in ${LANS}&lt;BR /&gt;do&lt;BR /&gt;  LNBR=${LAN%%:*}&lt;BR /&gt;  LINK=${LAN##*:}&lt;BR /&gt;  echo "\nlinkloop -i ${LNBR} ${LINK}\n----------------------"&lt;BR /&gt;  linkloop ${LINK}&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;root@server:&amp;gt; sh linkloop_test1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;linkloop -i 0 0x00306E13F682&lt;BR /&gt;----------------------&lt;BR /&gt;Link connectivity to LAN station: 0x00306E13F682&lt;BR /&gt;error:  expected primitive 0x30, got DL_ERROR_ACK&lt;BR /&gt;   dl_error_primitive = 0x2d&lt;BR /&gt;   dl_errno = 0x04&lt;BR /&gt;   dl_unix_errno = 57&lt;BR /&gt;error - did not receive data part of message&lt;BR /&gt;&lt;BR /&gt;linkloop -i 2 0x00306E0C541F&lt;BR /&gt;----------------------&lt;BR /&gt;Link connectivity to LAN station: 0x00306E0C541F&lt;BR /&gt;error:  expected primitive 0x30, got DL_ERROR_ACK&lt;BR /&gt;   dl_error_primitive = 0x2d&lt;BR /&gt;   dl_errno = 0x04&lt;BR /&gt;   dl_unix_errno = 57&lt;BR /&gt;error - did not receive data part of message&lt;BR /&gt;&lt;BR /&gt;linkloop -i 3 0x00306E38D363&lt;BR /&gt;----------------------&lt;BR /&gt;Link connectivity to LAN station: 0x00306E38D363&lt;BR /&gt;error:  expected primitive 0x30, got DL_ERROR_ACK&lt;BR /&gt;   dl_error_primitive = 0x2d&lt;BR /&gt;   dl_errno = 0x04&lt;BR /&gt;   dl_unix_errno = 57&lt;BR /&gt;error - did not receive data part of message&lt;BR /&gt;&lt;BR /&gt;linkloop -i 1 0x00306E21D5B7&lt;BR /&gt;----------------------&lt;BR /&gt;Link connectivity to LAN station: 0x00306E21D5B7&lt;BR /&gt;error:  expected primitive 0x30, got DL_ERROR_ACK&lt;BR /&gt;   dl_error_primitive = 0x2d&lt;BR /&gt;   dl_errno = 0x04&lt;BR /&gt;   dl_unix_errno = 57&lt;BR /&gt;error - did not receive data part of message&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Dec 2007 21:42:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083041#M92712</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2007-12-05T21:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083042#M92713</link>
      <description>&lt;!--!*#--&gt;Hi (again) Patrick:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Whenever I run your script on my server, there are no lan interfaces that come back ok.&lt;BR /&gt;&lt;BR /&gt;Ah, my apologies.  The manpages note that "-i PPA ...If this option is omitted, linkloop uses the first PPA it encounters in an internal data structure."&lt;BR /&gt;&lt;BR /&gt;Frankly, I missed that and would need to change:&lt;BR /&gt;&lt;BR /&gt;# linkloop ${LINK}&lt;BR /&gt;&lt;BR /&gt;...to:&lt;BR /&gt;&lt;BR /&gt;#  linkloop -i ${LNBR} ${LINK}&lt;BR /&gt;&lt;BR /&gt;...thus:&lt;BR /&gt;&lt;BR /&gt;# cat ./mylans&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;LANS=$(lanscan | awk 'NR&amp;gt;2 {print $3":"$2}' )&lt;BR /&gt;for LAN in ${LANS}&lt;BR /&gt;do&lt;BR /&gt;    LNBR=${LAN%%:*}&lt;BR /&gt;    LINK=${LAN##*:}&lt;BR /&gt;    echo "\nLAN ${LNBR}\nlinkloop -i ${LNBR} ${LINK}\n----------------------"&lt;BR /&gt;    linkloop -i ${LNBR} ${LINK}&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;...BUT, this could be done without parameter substitution in the first place using a read (thinking as Sandman showed):&lt;BR /&gt;&lt;BR /&gt;# cat ./mylans2&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;lanscan | awk 'NR&amp;gt;2 {print $3,$2}' | \&lt;BR /&gt;    while read LNBR LINK&lt;BR /&gt;    do&lt;BR /&gt;        echo "\nLAN ${LNBR}\nlinkloop -i ${LNBR} ${LINK}\n----------------------"&lt;BR /&gt;        linkloop -i ${LNBR} ${LINK}&lt;BR /&gt;    done&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;If nothing else, we let the shell do most of our work and spawn as absolutely few processes as necessary.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Dec 2007 22:22:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-help-needed/m-p/5083042#M92713</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-12-05T22:22:14Z</dc:date>
    </item>
  </channel>
</rss>

