<?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 scripting in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-scripting/m-p/4891429#M705232</link>
    <description>Thanks, Exactly what I was looking for.&lt;BR /&gt;&lt;BR /&gt;Josh</description>
    <pubDate>Wed, 16 Mar 2005 13:37:09 GMT</pubDate>
    <dc:creator>Joshua Scott</dc:creator>
    <dc:date>2005-03-16T13:37:09Z</dc:date>
    <item>
      <title>awk scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-scripting/m-p/4891425#M705228</link>
      <description>i'm gathering the tcp info and possible differences on our 7 servers, so I used this command to gather a list of parameters:&lt;BR /&gt;&lt;BR /&gt;ndd -h sup | grep tcp_ | awk '{print $1}' &amp;gt; ndd.input &lt;BR /&gt;&lt;BR /&gt;which gave me a list of all supported tunables in ndd.input&lt;BR /&gt;&lt;BR /&gt;I then want to run a script that puts the tunable name followed by a space, then the parameter setting like this:&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;tcp_xmit_lowater_lnf 16384&lt;BR /&gt;tcp_xmit_lowater_lnp 2048&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;so i can diff them.&lt;BR /&gt;I can use this command:&lt;BR /&gt;ndd -get /dev/tcp tcp_xmit_lowater_lnf&lt;BR /&gt;to get:&lt;BR /&gt;16384&lt;BR /&gt;&lt;BR /&gt;here's the script I have:&lt;BR /&gt;awk '{print "echo " $0 "\nndd -get /dev/tcp " $0}' ndd.input | sh &amp;gt; ndd.out.$HOST&lt;BR /&gt;&lt;BR /&gt;however, this outputs this form:&lt;BR /&gt;tcp_xmit_lowater_lnf&lt;BR /&gt;16384&lt;BR /&gt;tcp_xmit_lowater_lnp&lt;BR /&gt;2048&lt;BR /&gt;&lt;BR /&gt;so when I diff them, it shows the difference in values, but not which parameters they are.&lt;BR /&gt;&lt;BR /&gt;Any Ideas? &lt;BR /&gt;Thanks!&lt;BR /&gt;Josh</description>
      <pubDate>Wed, 16 Mar 2005 13:07:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-scripting/m-p/4891425#M705228</guid>
      <dc:creator>Joshua Scott</dc:creator>
      <dc:date>2005-03-16T13:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: awk scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-scripting/m-p/4891426#M705229</link>
      <description>I'm still looking at how to do it strictly in awk, but you could use this:&lt;BR /&gt;&lt;BR /&gt;for p in `&amp;lt; ndd.input`&lt;BR /&gt;do&lt;BR /&gt;echo "$p \c"&lt;BR /&gt;ndd -get /dev/tcp $p&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;David</description>
      <pubDate>Wed, 16 Mar 2005 13:25:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-scripting/m-p/4891426#M705229</guid>
      <dc:creator>David Child_1</dc:creator>
      <dc:date>2005-03-16T13:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: awk scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-scripting/m-p/4891427#M705230</link>
      <description>Sorry, ignore that last one. It would work, but here is the awk answer:&lt;BR /&gt;&lt;BR /&gt; awk '{print "echo \""$0 " \c\" ;ndd -get /dev/tcp " $0}' ndd.input | sh&lt;BR /&gt;&lt;BR /&gt;David</description>
      <pubDate>Wed, 16 Mar 2005 13:29:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-scripting/m-p/4891427#M705230</guid>
      <dc:creator>David Child_1</dc:creator>
      <dc:date>2005-03-16T13:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: awk scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-scripting/m-p/4891428#M705231</link>
      <description>try something like this:&lt;BR /&gt;&lt;BR /&gt;ndd -h sup | awk '/tcp_/ {&lt;BR /&gt;a="ndd -get /dev/tcp "$1 | getline value;&lt;BR /&gt;print $1, value;&lt;BR /&gt;}' &amp;gt; ndd.out.$HOST&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Mar 2005 13:34:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-scripting/m-p/4891428#M705231</guid>
      <dc:creator>c_51</dc:creator>
      <dc:date>2005-03-16T13:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: awk scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-scripting/m-p/4891429#M705232</link>
      <description>Thanks, Exactly what I was looking for.&lt;BR /&gt;&lt;BR /&gt;Josh</description>
      <pubDate>Wed, 16 Mar 2005 13:37:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-scripting/m-p/4891429#M705232</guid>
      <dc:creator>Joshua Scott</dc:creator>
      <dc:date>2005-03-16T13:37:09Z</dc:date>
    </item>
  </channel>
</rss>

