<?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 Programming in Linux in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031427#M76141</link>
    <description>I am running ksh on this linux machine. Since the old scripts on HP-UX were on ksh I ran it on linux also to be on the safer side.&lt;BR /&gt;If I put set -vx at the top of the script will it help me to debug, the program better. &lt;BR /&gt;I have not tried the close(file) command yet. So are you suggesting that it is a syntax issue. &lt;BR /&gt;Any other comments?&lt;BR /&gt;Thanks&lt;BR /&gt;Sam</description>
    <pubDate>Fri, 25 Jul 2003 19:23:24 GMT</pubDate>
    <dc:creator>Samuel Mathew</dc:creator>
    <dc:date>2003-07-25T19:23:24Z</dc:date>
    <item>
      <title>AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031419#M76133</link>
      <description>I am running a script that was made for HP-UX 10.20. We have ported this application to linux. IT has some awk commands in the script. &lt;BR /&gt;It shows the error close file&lt;BR /&gt;                         ^parse error.&lt;BR /&gt;^ sign is coming underneath 'file'. ANybody has any idea what is happening.?&lt;BR /&gt;I would appreciate a quick answer from the expert s.&lt;BR /&gt;The script has been changed in some places to run uner linux. But this one we cant figure that out.&lt;BR /&gt;So please help me. If you need any more information please let me know</description>
      <pubDate>Wed, 23 Jul 2003 15:15:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031419#M76133</guid>
      <dc:creator>Samuel Mathew</dc:creator>
      <dc:date>2003-07-23T15:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031420#M76134</link>
      <description>hey&lt;BR /&gt;&lt;BR /&gt;are u using a awk file with all the commands and then calling it as&lt;BR /&gt;&lt;BR /&gt;awk -f filename scriptname &lt;BR /&gt;&lt;BR /&gt;or something similar.&lt;BR /&gt;&lt;BR /&gt;if so check the filename.&lt;BR /&gt;&lt;BR /&gt;some more inputs pls.&lt;BR /&gt;&lt;BR /&gt;1. what is the name of the file it shows.&lt;BR /&gt;2. is it a data file or the commands file.&lt;BR /&gt;&lt;BR /&gt;-balaji</description>
      <pubDate>Wed, 23 Jul 2003 15:42:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031420#M76134</guid>
      <dc:creator>Balaji N</dc:creator>
      <dc:date>2003-07-23T15:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031421#M76135</link>
      <description>Balaji,&lt;BR /&gt;Thanks for the quick reply.&lt;BR /&gt;the error is like this:&lt;BR /&gt;awk: ../Drilling/awk/Drills:81:      close file&lt;BR /&gt;^parse error&lt;BR /&gt;awk: ../Drilling/awk/Drills:81:      close fTmp&lt;BR /&gt;^parse error&lt;BR /&gt;awk: ../Drilling/awk/Drills:81:      close fDrill&lt;BR /&gt;^parse error&lt;BR /&gt;^sign comes under the file,fTmp and fDrill respectively.&lt;BR /&gt;Those are files defined like this in the script&lt;BR /&gt;file=Dir"/"Class[Cur]&lt;BR /&gt;fTmp=Dir"/tmp/Unsorted_"MILL&lt;BR /&gt;fDrill=Dir"/tmp/Drill_"MILL&lt;BR /&gt;So I assume that they are data files. I cant find them anywhere anyway&lt;BR /&gt;&lt;BR /&gt;This is a tricky situation for me.&lt;BR /&gt;I would appreciate a help&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Jul 2003 16:20:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031421#M76135</guid>
      <dc:creator>Samuel Mathew</dc:creator>
      <dc:date>2003-07-23T16:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031422#M76136</link>
      <description>Please post the script or relavent portions.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 23 Jul 2003 16:38:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031422#M76136</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-07-23T16:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031423#M76137</link>
      <description>hmm..&lt;BR /&gt;too little info. if u could post snippets from the file with the error line indicated or the entire file, can have a look.&lt;BR /&gt;&lt;BR /&gt;-balaji</description>
      <pubDate>Wed, 23 Jul 2003 17:02:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031423#M76137</guid>
      <dc:creator>Balaji N</dc:creator>
      <dc:date>2003-07-23T17:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031424#M76138</link>
      <description>Thanks. Here isone of the script file.&lt;BR /&gt;If you can make out something from this, please let me know. There are a number of script files in this application that uses awk. I am a null on awk and sed as such.&lt;BR /&gt;Thanks&lt;BR /&gt;Bye</description>
      <pubDate>Fri, 25 Jul 2003 03:42:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031424#M76138</guid>
      <dc:creator>Samuel Mathew</dc:creator>
      <dc:date>2003-07-25T03:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031425#M76139</link>
      <description>Simply put, try 'close(file)'.</description>
      <pubDate>Fri, 25 Jul 2003 04:12:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031425#M76139</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2003-07-25T04:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031426#M76140</link>
      <description>Also check the shell you are running in.&lt;BR /&gt;&lt;BR /&gt;If you script calls awk within the shell, it maybe a shell issue.&lt;BR /&gt;&lt;BR /&gt;On 10.20 you probably were using the corn ksh shell. On the Linux machine you probably are using bash or the posix shell. &lt;BR /&gt;&lt;BR /&gt;Awk is also a little different since they were compiled on different Operating Systems.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;One more suggestion is to start with one step of the script at a time. This may help indicated which section of the script is having the port issue.</description>
      <pubDate>Fri, 25 Jul 2003 11:52:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031426#M76140</guid>
      <dc:creator>Krishna Prasad</dc:creator>
      <dc:date>2003-07-25T11:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031427#M76141</link>
      <description>I am running ksh on this linux machine. Since the old scripts on HP-UX were on ksh I ran it on linux also to be on the safer side.&lt;BR /&gt;If I put set -vx at the top of the script will it help me to debug, the program better. &lt;BR /&gt;I have not tried the close(file) command yet. So are you suggesting that it is a syntax issue. &lt;BR /&gt;Any other comments?&lt;BR /&gt;Thanks&lt;BR /&gt;Sam</description>
      <pubDate>Fri, 25 Jul 2003 19:23:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031427#M76141</guid>
      <dc:creator>Samuel Mathew</dc:creator>
      <dc:date>2003-07-25T19:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031428#M76142</link>
      <description>I could get rid of the errorwith awk. The suggestion to close(file) helped. I will be assigning points. Now &lt;BR /&gt;I have a problem with a function that is being called. I am attaching that here. The error is. "[0.00] Unexpected '.' &lt;BR /&gt;Can any of you help us with this. We suspect that this function attached here is causing it after we ran the scripts with set -vx.&lt;BR /&gt;I would appreciate help.&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jul 2003 02:07:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031428#M76142</guid>
      <dc:creator>Samuel Mathew</dc:creator>
      <dc:date>2003-07-29T02:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031429#M76143</link>
      <description>[ $G68 -ne 0 ] &amp;amp;&amp;amp;&lt;BR /&gt;binLinux/GenMill $Mill G68 $G68 "$Sign"&lt;BR /&gt;#       printf 'G00 G90 G58 X0. Y0.\nG58 G68 X0 Y0 R%c[%0.3g]\n' "$Sign" "$G68"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;These three lines are truely interseting..  The 'printf' might have been causing your error, but given the way these 3 lines are at the moment, I'd have expected something else, like a Syntax error.&lt;BR /&gt;&lt;BR /&gt;This is obviously shell script, and you've not said which shell you're using.  I'll assume bash or ksh for the moment.&lt;BR /&gt;&lt;BR /&gt;The single [] around $G68 are using the external 'test' application, and assuming $G68 is numerical, should be fine.  If it wasn't, you'd be getting "integer expression expected" errors on STDERR.&lt;BR /&gt;&lt;BR /&gt;With the command on the next line after &amp;amp;&amp;amp; however, this portion of the routine appears that it would never return the error you are describing.&lt;BR /&gt;&lt;BR /&gt;You've siad you've run it with 'set -xv', then you should have seen exactally where it's falling over.&lt;BR /&gt;&lt;BR /&gt;If you could paste us the output you get when using 'set -x' for when it calls this function, we might be able to help further.</description>
      <pubDate>Tue, 29 Jul 2003 03:27:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031429#M76143</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2003-07-29T03:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031430#M76144</link>
      <description>First of all, this is the snippet that calls the WriteOps function:&lt;BR /&gt;&lt;BR /&gt;   gawk ...&lt;BR /&gt;   WriteOps&lt;BR /&gt;fi &amp;gt;&amp;gt; ${Mill}_$Func.nc&lt;BR /&gt;ReadOpLine $((OpN+1)) $Stat&lt;BR /&gt;&lt;BR /&gt;And this is the output with set -vx&lt;BR /&gt;&lt;BR /&gt;+ WriteOps&lt;BR /&gt;SquD: bin/Milling[129]:0.00:unexpected '.'&lt;BR /&gt;SquD: bin/Milling[129]:0.00:unexpected '.'&lt;BR /&gt;+ ReadOpLine 2 1&lt;BR /&gt;&lt;BR /&gt;The 129th line of Milling is the last line of code in the file and simply states 'fi'&lt;BR /&gt;&lt;BR /&gt;Thanks for all your help&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Jul 2003 02:38:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031430#M76144</guid>
      <dc:creator>Samuel Mathew</dc:creator>
      <dc:date>2003-07-30T02:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031431#M76145</link>
      <description>First of all, this is the snippet that calls the WriteOps function:&lt;BR /&gt;&lt;BR /&gt;   WriteOps&lt;BR /&gt;fi &amp;gt;&amp;gt; ${Mill}_$Func.nc&lt;BR /&gt;ReadOpLine $((OpN+1)) $Stat&lt;BR /&gt;&lt;BR /&gt;And this is the output with set -vx&lt;BR /&gt;&lt;BR /&gt;+ WriteOps&lt;BR /&gt;SquD: bin/Milling[129]:0.00:unexpected '.'&lt;BR /&gt;SquD: bin/Milling[129]:0.00:unexpected '.'&lt;BR /&gt;+ ReadOpLine 2 1&lt;BR /&gt;&lt;BR /&gt;The 129th line of Milling is the last line of code in the file and simply states 'fi'&lt;BR /&gt;&lt;BR /&gt;Thanks for all your help&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Jul 2003 02:38:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031431#M76145</guid>
      <dc:creator>Samuel Mathew</dc:creator>
      <dc:date>2003-07-30T02:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031432#M76146</link>
      <description>I don't suppose you'd be willing to provide all of this routine, so we can look at it from start-to-finish.  we're just not getting enough information with the snippets you're providing.</description>
      <pubDate>Wed, 30 Jul 2003 02:56:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031432#M76146</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2003-07-30T02:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031433#M76147</link>
      <description>Stuart,&lt;BR /&gt;Sorry about that. I am attaching the full code of the routine that is giving the problem. I hope you the error that was coming which I had posted above. If you need any further input, I would be more than willing to give. IT is taking a lot of our time to transfer this script from HP-UX to Linux. &lt;BR /&gt;Thanks in advance.&lt;BR /&gt;Sam</description>
      <pubDate>Thu, 31 Jul 2003 15:09:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031433#M76147</guid>
      <dc:creator>Samuel Mathew</dc:creator>
      <dc:date>2003-07-31T15:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Programming in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031434#M76148</link>
      <description>Unfortunately, I can't see anything wrong with that script.&lt;BR /&gt;&lt;BR /&gt;Modify the first line (#!/bin/ksh) to have a -x on the end of it, tne walk though to make sure each line gets the sorts of values you expect.</description>
      <pubDate>Thu, 31 Jul 2003 23:55:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-programming-in-linux/m-p/3031434#M76148</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2003-07-31T23:55:58Z</dc:date>
    </item>
  </channel>
</rss>

