<?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 awk script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2493639#M804985</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;I have put these commands in a file named as r&lt;BR /&gt;date&lt;BR /&gt;uname ?a&lt;BR /&gt;uptime&lt;BR /&gt;&lt;BR /&gt;and running this command &lt;BR /&gt;# for i in `cat r |awk  -F n ?{print}?`&lt;BR /&gt;&amp;gt;do&lt;BR /&gt;&amp;gt;echo $i&lt;BR /&gt;&amp;gt;done&lt;BR /&gt; and the output is &lt;BR /&gt;&lt;BR /&gt;date&lt;BR /&gt;uname &lt;BR /&gt;-a&lt;BR /&gt;uptime&lt;BR /&gt;&lt;BR /&gt;and output I want is &lt;BR /&gt;date&lt;BR /&gt;uname ?a&lt;BR /&gt;uptime&lt;BR /&gt;&lt;BR /&gt;Any help is appreciated&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
    <pubDate>Wed, 14 Feb 2001 16:59:42 GMT</pubDate>
    <dc:creator>Asad Malik</dc:creator>
    <dc:date>2001-02-14T16:59:42Z</dc:date>
    <item>
      <title>awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2493639#M804985</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I have put these commands in a file named as r&lt;BR /&gt;date&lt;BR /&gt;uname ?a&lt;BR /&gt;uptime&lt;BR /&gt;&lt;BR /&gt;and running this command &lt;BR /&gt;# for i in `cat r |awk  -F n ?{print}?`&lt;BR /&gt;&amp;gt;do&lt;BR /&gt;&amp;gt;echo $i&lt;BR /&gt;&amp;gt;done&lt;BR /&gt; and the output is &lt;BR /&gt;&lt;BR /&gt;date&lt;BR /&gt;uname &lt;BR /&gt;-a&lt;BR /&gt;uptime&lt;BR /&gt;&lt;BR /&gt;and output I want is &lt;BR /&gt;date&lt;BR /&gt;uname ?a&lt;BR /&gt;uptime&lt;BR /&gt;&lt;BR /&gt;Any help is appreciated&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Feb 2001 16:59:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2493639#M804985</guid>
      <dc:creator>Asad Malik</dc:creator>
      <dc:date>2001-02-14T16:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2493640#M804986</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Before executing your for loop, do&lt;BR /&gt;&lt;BR /&gt;IFS=""&lt;BR /&gt;&lt;BR /&gt;and after the for loop do&lt;BR /&gt;&lt;BR /&gt;unset IFS&lt;BR /&gt;&lt;BR /&gt;See IFS in sh-posix(1) for descrip^tion of IFS.&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Rik</description>
      <pubDate>Wed, 14 Feb 2001 17:05:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2493640#M804986</guid>
      <dc:creator>RikTytgat</dc:creator>
      <dc:date>2001-02-14T17:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2493641#M804987</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Or (more simple):&lt;BR /&gt;&lt;BR /&gt;cat r | awk '{print}'&lt;BR /&gt;&lt;BR /&gt;Bye,&lt;BR /&gt;Rik</description>
      <pubDate>Wed, 14 Feb 2001 17:06:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2493641#M804987</guid>
      <dc:creator>RikTytgat</dc:creator>
      <dc:date>2001-02-14T17:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2493642#M804988</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I believe the following script does what you require ie. display the commands in r in a script:&lt;BR /&gt;==========================&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;cat r|while read a b&lt;BR /&gt;do&lt;BR /&gt;  echo $a $b # display the command in each line of file r&lt;BR /&gt;  $a $b # execute each command along with its arguments in each line of file r&lt;BR /&gt;done&lt;BR /&gt;==========================&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong&lt;BR /&gt;Brainbench MVP for Unix Admin&lt;BR /&gt;&lt;A href="http://www.brainbench.com" target="_blank"&gt;http://www.brainbench.com&lt;/A&gt;</description>
      <pubDate>Wed, 14 Feb 2001 17:09:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2493642#M804988</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2001-02-14T17:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2493643#M804989</link>
      <description>Please forgive me for seeming dense, but what is the INTENT of this script (the "for loop", etc.)?</description>
      <pubDate>Thu, 15 Feb 2001 15:12:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2493643#M804989</guid>
      <dc:creator>Don Bentz</dc:creator>
      <dc:date>2001-02-15T15:12:03Z</dc:date>
    </item>
  </channel>
</rss>

