<?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 Persistant awk error in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/persistant-awk-error/m-p/3822741#M24178</link>
    <description>Hi &lt;BR /&gt;&lt;BR /&gt;I have this two lines of awk code in some script awk '{FS="|"}&lt;BR /&gt;&lt;BR /&gt;awk 'BEGIN { print " some text for test purposes " }'&lt;BR /&gt;Script only should print " some text for test purposes " ... that is only requrement on this script....&lt;BR /&gt;&lt;BR /&gt;when I run this script I got an error like below &lt;BR /&gt;&lt;BR /&gt;awk: Syntax error at source line 2&lt;BR /&gt;&lt;BR /&gt;awk: Context is&lt;BR /&gt;&lt;BR /&gt;        awk &amp;gt;&amp;gt;&amp;gt;  BEGIN &amp;lt;&amp;lt;&amp;lt; &lt;BR /&gt;&lt;BR /&gt;awk: Missing }&lt;BR /&gt;&lt;BR /&gt;awk: Bailing out at source line 2&lt;BR /&gt;&lt;BR /&gt;And no I am not able to figure out what could be a possible reason for this error.&lt;BR /&gt;It would be help me a lot if someone know and have free time and will to write down what I should change in order to make this works.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
    <pubDate>Thu, 13 Jul 2006 02:21:39 GMT</pubDate>
    <dc:creator>debian111</dc:creator>
    <dc:date>2006-07-13T02:21:39Z</dc:date>
    <item>
      <title>Persistant awk error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/persistant-awk-error/m-p/3822741#M24178</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;I have this two lines of awk code in some script awk '{FS="|"}&lt;BR /&gt;&lt;BR /&gt;awk 'BEGIN { print " some text for test purposes " }'&lt;BR /&gt;Script only should print " some text for test purposes " ... that is only requrement on this script....&lt;BR /&gt;&lt;BR /&gt;when I run this script I got an error like below &lt;BR /&gt;&lt;BR /&gt;awk: Syntax error at source line 2&lt;BR /&gt;&lt;BR /&gt;awk: Context is&lt;BR /&gt;&lt;BR /&gt;        awk &amp;gt;&amp;gt;&amp;gt;  BEGIN &amp;lt;&amp;lt;&amp;lt; &lt;BR /&gt;&lt;BR /&gt;awk: Missing }&lt;BR /&gt;&lt;BR /&gt;awk: Bailing out at source line 2&lt;BR /&gt;&lt;BR /&gt;And no I am not able to figure out what could be a possible reason for this error.&lt;BR /&gt;It would be help me a lot if someone know and have free time and will to write down what I should change in order to make this works.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 13 Jul 2006 02:21:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/persistant-awk-error/m-p/3822741#M24178</guid>
      <dc:creator>debian111</dc:creator>
      <dc:date>2006-07-13T02:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Persistant awk error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/persistant-awk-error/m-p/3822742#M24179</link>
      <description>You dont need BEGIN and END declarations:&lt;BR /&gt;&lt;BR /&gt;The script could be like this:&lt;BR /&gt;&lt;BR /&gt;cat awk.script&lt;BR /&gt;&lt;BR /&gt;{ print "Some text" }&lt;BR /&gt;&lt;BR /&gt;echo | awk -f awk.script &lt;BR /&gt;&lt;BR /&gt;Remember that awk spect to precess something (a file or command output), that is why the echo is inserted.&lt;BR /&gt;&lt;BR /&gt;What I did not understand is the FS="|" declaration, anyway you can declare variables like this:&lt;BR /&gt;&lt;BR /&gt;BEGIN { FS=":" }&lt;BR /&gt;{ print "Username",$1, "UID", $3 }&lt;BR /&gt;&lt;BR /&gt;awk -f /tmp/awk.script /etc/passwd</description>
      <pubDate>Thu, 13 Jul 2006 09:01:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/persistant-awk-error/m-p/3822742#M24179</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-07-13T09:01:21Z</dc:date>
    </item>
  </channel>
</rss>

