<?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 script problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449793#M10558</link>
    <description>I am guessing you are hitting the system limit of number of open files per process. You could try increasing this to say 200, but if your list of files is likely to get higher than this you'll be constantly changing it. I would suggest you get your script to close the file once you have finished with it. Sorry I don't have a system at the moment to try it on.</description>
    <pubDate>Tue, 03 Oct 2000 13:20:54 GMT</pubDate>
    <dc:creator>Guy Draper</dc:creator>
    <dc:date>2000-10-03T13:20:54Z</dc:date>
    <item>
      <title>Awk script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449790#M10555</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I run an awk command in a script named script + error.txt attached. When it reaches 54 lines in the output file, it gives me the error seen in script + error.txt which is attached. Is there a way to resolve this or do you know why it happens so that I can look to work round it?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Stephen&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Oct 2000 13:08:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449790#M10555</guid>
      <dc:creator>Stephen Hughes</dc:creator>
      <dc:date>2000-10-03T13:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Awk script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449791#M10556</link>
      <description>try looking at what your maxfiles kernel parm is set to 60 ? maybe worth increasing to 200, otherwise it may be a hard coded value inside of awk(1).</description>
      <pubDate>Tue, 03 Oct 2000 13:13:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449791#M10556</guid>
      <dc:creator>Alex Glennie</dc:creator>
      <dc:date>2000-10-03T13:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Awk script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449792#M10557</link>
      <description>The problem is that awk is opening a file in each iteration. This file doesn't get closed and there is a system limit of (in you case) 64 open files per process.&lt;BR /&gt;&lt;BR /&gt;You need to ensure that awk is closing the file.</description>
      <pubDate>Tue, 03 Oct 2000 13:16:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449792#M10557</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2000-10-03T13:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Awk script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449793#M10558</link>
      <description>I am guessing you are hitting the system limit of number of open files per process. You could try increasing this to say 200, but if your list of files is likely to get higher than this you'll be constantly changing it. I would suggest you get your script to close the file once you have finished with it. Sorry I don't have a system at the moment to try it on.</description>
      <pubDate>Tue, 03 Oct 2000 13:20:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449793#M10558</guid>
      <dc:creator>Guy Draper</dc:creator>
      <dc:date>2000-10-03T13:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Awk script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449794#M10559</link>
      <description>Stephen:&lt;BR /&gt;&lt;BR /&gt;It appears that the objective is to copy files based on some criteria.  May I suggest that instead of using the system call feature of awk, that you simply build copy commands as output of the awk script.  That is, the total script might start by building a script "preamble"; append the copy command with the awk process to the running script file, and then execute the dynamically constructed script.&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 03 Oct 2000 13:39:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449794#M10559</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2000-10-03T13:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Awk script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449795#M10560</link>
      <description>I think that what you are tring to do could be done with a fairly simple shell script. Something like:-&lt;BR /&gt;&lt;BR /&gt;cat $WORK/acc_reformat |&lt;BR /&gt;while read ARG1 ARG2 ARG3 ARG4 &lt;BR /&gt;do&lt;BR /&gt;FILE=$(ls -l /u/odexcc/FTP/$ARG3 |grep "$ARG4" | grep "$ARG2" |cut -c59-73)&lt;BR /&gt;echo /u/odexcc/FTP/$ARG3/$FILE &amp;gt;&amp;gt; $WORK/files.out&lt;BR /&gt;cp /u/odexcc/FTP/$ARG3/$FILE /u/stephen/shell/recon/ftp_files&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This could be made much more efficient if you supplied more details of what you are trying to achieve.</description>
      <pubDate>Tue, 03 Oct 2000 14:02:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449795#M10560</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2000-10-03T14:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Awk script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449796#M10561</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;i've put you the script with a close command in it. Give it a try.&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Wed, 04 Oct 2000 06:49:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script-problem/m-p/2449796#M10561</guid>
      <dc:creator>Andreas Voss</dc:creator>
      <dc:date>2000-10-04T06:49:18Z</dc:date>
    </item>
  </channel>
</rss>

