<?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 - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929222#M104976</link>
    <description>You can use awk -v var="value"&lt;BR /&gt;&lt;BR /&gt;# echo "hi" | awk -v var=bye '{ print $0" "var }'&lt;BR /&gt;hi bye&lt;BR /&gt;# Another way as after awk using variable&lt;BR /&gt;# echo "hi" | awk '{ print $0" "var }' var=bye&lt;BR /&gt;hi bye&lt;BR /&gt;&lt;BR /&gt;hth.</description>
    <pubDate>Tue, 27 Sep 2005 01:21:24 GMT</pubDate>
    <dc:creator>Muthukumar_5</dc:creator>
    <dc:date>2005-09-27T01:21:24Z</dc:date>
    <item>
      <title>AWK</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929220#M104974</link>
      <description>How to assign awk value in some Variable for example&lt;BR /&gt;awk NR==1 { print substr($0,33,3); } ${MQUTIL}/abc.snf&lt;BR /&gt;&lt;BR /&gt;for above output value will go to some variable</description>
      <pubDate>Tue, 27 Sep 2005 01:13:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929220#M104974</guid>
      <dc:creator>Karthick K S</dc:creator>
      <dc:date>2005-09-27T01:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: AWK</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929221#M104975</link>
      <description>awk -v "var=value" '{your code}'</description>
      <pubDate>Tue, 27 Sep 2005 01:19:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929221#M104975</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-09-27T01:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: AWK</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929222#M104976</link>
      <description>You can use awk -v var="value"&lt;BR /&gt;&lt;BR /&gt;# echo "hi" | awk -v var=bye '{ print $0" "var }'&lt;BR /&gt;hi bye&lt;BR /&gt;# Another way as after awk using variable&lt;BR /&gt;# echo "hi" | awk '{ print $0" "var }' var=bye&lt;BR /&gt;hi bye&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Tue, 27 Sep 2005 01:21:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929222#M104976</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-09-27T01:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: AWK</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929223#M104977</link>
      <description>You want store the ouput of awk to Variable or want use variable in awk?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;you can use BEGIN block or use awk option:&lt;BR /&gt;&lt;BR /&gt;awk --assign var=val&lt;BR /&gt;&lt;BR /&gt;eg:&lt;BR /&gt;&lt;BR /&gt;$ echo | gawk -v var=200 'BEGIN { var = var + 100 }; END { print var }'&lt;BR /&gt;300&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Sep 2005 01:21:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929223#M104977</guid>
      <dc:creator>VEL_1</dc:creator>
      <dc:date>2005-09-27T01:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: AWK</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929224#M104978</link>
      <description>What My question is &lt;BR /&gt;&lt;BR /&gt;Var = 'awk NR==1 { print substr($0,33,3); } ${MQUTIL}/abc.snf'&lt;BR /&gt;&lt;BR /&gt;echo $VAR&lt;BR /&gt;output is not coming&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Sep 2005 01:21:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929224#M104978</guid>
      <dc:creator>Karthick K S</dc:creator>
      <dc:date>2005-09-27T01:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: AWK</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929225#M104979</link>
      <description>As per # man awk says, &lt;BR /&gt;&lt;BR /&gt;-v var=value   Cause var=value assignment to occur before the BEGIN action (if it exists) is executed.&lt;BR /&gt;&lt;BR /&gt;Arun</description>
      <pubDate>Tue, 27 Sep 2005 01:22:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929225#M104979</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2005-09-27T01:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: AWK</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929226#M104980</link>
      <description>Raj,&lt;BR /&gt;&lt;BR /&gt;I want to store output of awk in some variable</description>
      <pubDate>Tue, 27 Sep 2005 01:23:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929226#M104980</guid>
      <dc:creator>Karthick K S</dc:creator>
      <dc:date>2005-09-27T01:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: AWK</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929227#M104981</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Its case sensitive. &lt;BR /&gt;&lt;BR /&gt;var=`awk NR==1 { print substr($0,33,3); } ${MQUTIL}/abc.snf`&lt;BR /&gt;&lt;BR /&gt;echo $var</description>
      <pubDate>Tue, 27 Sep 2005 01:25:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929227#M104981</guid>
      <dc:creator>VEL_1</dc:creator>
      <dc:date>2005-09-27T01:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: AWK</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929228#M104982</link>
      <description>Sorry. Do you want to store the return contents or return value of awk NR==1 { print substr($0,33,3); } ${MQUTIL}/abc.snf command execution.?&lt;BR /&gt;&lt;BR /&gt;# Return String or Content&lt;BR /&gt;retstr=$(awk NR==1 { print substr($0,33,3); } ${MQUTIL}/abc.snf)&lt;BR /&gt;&lt;BR /&gt;# Return Value of execution&lt;BR /&gt;awk NR==1 { print substr($0,33,3); } ${MQUTIL}/abc.snf&lt;BR /&gt;ret=$?&lt;BR /&gt;echo "Return value is ${ret}"&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Sep 2005 01:25:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929228#M104982</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-09-27T01:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: AWK</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929229#M104983</link>
      <description>Var = `awk NR==1 { print substr($0,33,3); } ${MQUTIL}/abc.snf`&lt;BR /&gt;&lt;BR /&gt;echo $Var &lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Tue, 27 Sep 2005 01:26:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929229#M104983</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2005-09-27T01:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: AWK</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929230#M104984</link>
      <description>THanks all,&lt;BR /&gt;&lt;BR /&gt;Now i got it.</description>
      <pubDate>Tue, 27 Sep 2005 01:40:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk/m-p/4929230#M104984</guid>
      <dc:creator>Karthick K S</dc:creator>
      <dc:date>2005-09-27T01:40:15Z</dc:date>
    </item>
  </channel>
</rss>

