<?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 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2827348#M721024</link>
    <description>It's really pretty easy:&lt;BR /&gt;&lt;BR /&gt;Because the entries are whitespace separated you really don't even need awk.&lt;BR /&gt;&lt;BR /&gt;cat basefile | while read A B&lt;BR /&gt;do&lt;BR /&gt;  echo "1st var = ${A} 2nd var = ${B}"&lt;BR /&gt;done&lt;BR /&gt;</description>
    <pubDate>Wed, 16 Oct 2002 19:00:51 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2002-10-16T19:00:51Z</dc:date>
    <item>
      <title>awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2827346#M721022</link>
      <description>I have a file consisting of two columns separated by a space.  I can assign a variable name to one column by doing:&lt;BR /&gt;&lt;BR /&gt;for i in `awk '{print $1} ' basefile`&lt;BR /&gt;&lt;BR /&gt;But how do I assign a variable name to the column 2 value?&lt;BR /&gt;&lt;BR /&gt;basefile&lt;BR /&gt;--------&lt;BR /&gt;john nancy&lt;BR /&gt;gene esther&lt;BR /&gt;mike ruth</description>
      <pubDate>Wed, 16 Oct 2002 18:50:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2827346#M721022</guid>
      <dc:creator>Karen Hall</dc:creator>
      <dc:date>2002-10-16T18:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2827347#M721023</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Use the $2 parameter for the value in the second column.  To loop on the values of the second column try this:&lt;BR /&gt;&lt;BR /&gt;for i in `awk '{print $2}' basefile`&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I'm just curious.  What are you trying to do with it anyway?&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;P.S. Get ready for the Perl wizards to descend on you!  ;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Oct 2002 18:57:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2827347#M721023</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2002-10-16T18:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2827348#M721024</link>
      <description>It's really pretty easy:&lt;BR /&gt;&lt;BR /&gt;Because the entries are whitespace separated you really don't even need awk.&lt;BR /&gt;&lt;BR /&gt;cat basefile | while read A B&lt;BR /&gt;do&lt;BR /&gt;  echo "1st var = ${A} 2nd var = ${B}"&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Oct 2002 19:00:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2827348#M721024</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-10-16T19:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2827349#M721025</link>
      <description>cat basefile | awk '{print $1}' &amp;gt; abc&lt;BR /&gt;cat basefile | awk '{print $2}' &amp;gt;&amp;gt; abc&lt;BR /&gt;&lt;BR /&gt;for i in 'awk {print $1 }' `abc`&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
      <pubDate>Wed, 16 Oct 2002 19:03:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2827349#M721025</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2002-10-16T19:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2827350#M721026</link>
      <description>A.Clay, you're right!  That works great.  Sometimes you can't see the forest for the trees. Thanks!</description>
      <pubDate>Wed, 16 Oct 2002 19:23:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2827350#M721026</guid>
      <dc:creator>Karen Hall</dc:creator>
      <dc:date>2002-10-16T19:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2827351#M721027</link>
      <description>As an aside, I strongly recommend you get a copy of the paperback "The AWK Programming Language" by Aho, Weinberger, Kernighan (AWK's developers).&lt;BR /&gt;&lt;BR /&gt;It's the most concise yet complete manual for anything I've ever seen, and covers AWK very simply.&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Oct 2002 12:07:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2827351#M721027</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2002-10-17T12:07:37Z</dc:date>
    </item>
  </channel>
</rss>

