<?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: script loop help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906828#M405301</link>
    <description>Simon,&lt;BR /&gt;you seem understood me...&lt;BR /&gt;how about this ?&lt;BR /&gt;until [ "`cat rlstat.log|egrep -i ${time_chk_f_crt}_TFBUCH1C.100.txt.rvs|awk '{print $8}'|cut -c-15-` = "${time_chk_f_crt}_TFBUCH1C.100.txt.rvs"&lt;BR /&gt;do&lt;BR /&gt;sleep;&lt;BR /&gt;done&lt;BR /&gt;echo $DIR1/${time_chk_f_crt}_TFBUCH1C.100.txt.rvs succesfully SEND... `date`&amp;gt;&amp;gt;$DIR0/rvs_sap_send_log&lt;BR /&gt;  rm -Rf *.100.rvs.tmp&lt;BR /&gt;  rm -Rf *.100.txt.rvs&lt;BR /&gt;  rm -Rf *.100.rcp&lt;BR /&gt;  rm -Rf *.100.txt &lt;BR /&gt;  rm -Rf *.100&lt;BR /&gt;&lt;BR /&gt;Does it work?</description>
    <pubDate>Fri, 10 Jun 2005 10:00:11 GMT</pubDate>
    <dc:creator>Cem Tugrul</dc:creator>
    <dc:date>2005-06-10T10:00:11Z</dc:date>
    <item>
      <title>script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906811#M405284</link>
      <description>Hi forum,&lt;BR /&gt;i need urgent help about a script that i have&lt;BR /&gt;written...&lt;BR /&gt;in script i want to go loop for to find a specific strings in another file and if i find the string then want to remove some files&lt;BR /&gt;and exit from loop&lt;BR /&gt;&lt;BR /&gt;All replies will be submitted points!!!&lt;BR /&gt;Thank's</description>
      <pubDate>Fri, 10 Jun 2005 08:40:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906811#M405284</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2005-06-10T08:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906812#M405285</link>
      <description>opppps,&lt;BR /&gt;here is my transfer script...</description>
      <pubDate>Fri, 10 Jun 2005 08:44:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906812#M405285</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2005-06-10T08:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906813#M405286</link>
      <description>How about using a find command?&lt;BR /&gt;&lt;BR /&gt;find /start_dir -exec grep "string to look for" |xargs rm&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 10 Jun 2005 08:44:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906813#M405286</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2005-06-10T08:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906814#M405287</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Code something like:&lt;BR /&gt;&lt;BR /&gt;MAX_EST_TIME=120&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;# Loop until the establish is complete or times out.&lt;BR /&gt;#&lt;BR /&gt;          count=1&lt;BR /&gt;          _ret=1&lt;BR /&gt;          while [ $count -le $MAX_EST_TIME -a $_ret != 0 ]&lt;BR /&gt;          do&lt;BR /&gt;              sleep 60&lt;BR /&gt;&lt;BR /&gt;# your code&lt;BR /&gt;&lt;BR /&gt;for i in `grep $STRING /somefile`&lt;BR /&gt;do&lt;BR /&gt;  rm $FILE1&lt;BR /&gt;  exit 1&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;or something like that...&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Jun 2005 08:45:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906814#M405287</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2005-06-10T08:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906815#M405288</link>
      <description>Oops, correction:&lt;BR /&gt;&lt;BR /&gt;find /start_dir -exec grep "string to look for" {} \; |xargs rm&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 10 Jun 2005 08:48:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906815#M405288</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2005-06-10T08:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906816#M405289</link>
      <description>my favorite loop for these issues.&lt;BR /&gt;&lt;BR /&gt;while read -r &lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;# code&lt;BR /&gt;&lt;BR /&gt;done &amp;lt; input_file  #lists the files to be processed, can be created by Pete's find command.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 10 Jun 2005 08:50:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906816#M405289</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-06-10T08:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906817#M405290</link>
      <description>Hi Geoff &amp;amp; Pete,&lt;BR /&gt;if you look my script i do not want to use&lt;BR /&gt;sleep command...it is a transfer script&lt;BR /&gt;i mean i have a transfer program called&lt;BR /&gt;RVS and it is also screen oriented but i do not use..i have put the script and run as root from cron..i have many transfers scripts&lt;BR /&gt;with rvs and always run from root cron...&lt;BR /&gt;When a file succesfully transfer it saves&lt;BR /&gt;in rlstat.log file which belongs to user&lt;BR /&gt;RVs...</description>
      <pubDate>Fri, 10 Jun 2005 08:52:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906817#M405290</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2005-06-10T08:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906818#M405291</link>
      <description>Sorry, didn't see your script.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 10 Jun 2005 08:55:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906818#M405291</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2005-06-10T08:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906819#M405292</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;to exit from  a loop you can use break &lt;BR /&gt;while :&lt;BR /&gt;do&lt;BR /&gt;if [ -f /tmp/toto ]&lt;BR /&gt;then &lt;BR /&gt;   rm /tmp/toto&lt;BR /&gt;   break&lt;BR /&gt;fi&lt;BR /&gt;sleep 500&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;or with a function&lt;BR /&gt;function  testandremove&lt;BR /&gt;{&lt;BR /&gt;  if [ -f /tmp/toto ]&lt;BR /&gt;  then &lt;BR /&gt;   rm /tmp/toto&lt;BR /&gt;   return 1&lt;BR /&gt;  fi&lt;BR /&gt;  return 0&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;while testandremove&lt;BR /&gt;do&lt;BR /&gt;  sleep 600&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;while :&lt;BR /&gt;do&lt;BR /&gt;  testandremove&lt;BR /&gt;  if [ $? == 0 ]&lt;BR /&gt;  then&lt;BR /&gt;     break&lt;BR /&gt;  fi&lt;BR /&gt;  sleep 600&lt;BR /&gt;done</description>
      <pubDate>Fri, 10 Jun 2005 08:57:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906819#M405292</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2005-06-10T08:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906820#M405293</link>
      <description>Hi Guys,&lt;BR /&gt;i am really bat at scripting...Please&lt;BR /&gt;take a look of my script and maybe the&lt;BR /&gt;3rd eyes can see or maintain my script&lt;BR /&gt;so i need your guide...&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Jun 2005 08:58:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906820#M405293</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2005-06-10T08:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906821#M405294</link>
      <description>There's no "looping" in your script that I can see, but if I understand correctly, you want to shrink:&lt;BR /&gt;&lt;BR /&gt;if [ -f ${time_chk_f_crt}_TFBUCH1C.100.txt ]&lt;BR /&gt;...&lt;BR /&gt;fi&lt;BR /&gt;if [ -f ${time_chk_f_crt}_TFBUCH1C.300.txt ]&lt;BR /&gt;...&lt;BR /&gt;fi&lt;BR /&gt;if [ -f ${time_chk_f_crt}_TFBUCH1C.500.txt ]&lt;BR /&gt;...&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;down to a more manageable "loop" (basically detecting and processing 100 300 500 etc)?  Then I would recommend something like: -&lt;BR /&gt;&lt;BR /&gt;for FILE in ${time_chk_f_crt}_TFBUCH1C.100.txt&lt;BR /&gt;do&lt;BR /&gt;  NUM=`cut -d. -f2`&lt;BR /&gt;  /users/rvs/system/rvsut2fv $DIR1/${time_chk_f_crt}_TFBUCH1C.$NUM.txt.rvs F 650 $DIR1/${time_chk_f_crt}_TFBUCH1C.$NUM.txt T&lt;BR /&gt;  echo "SEND DSN=\"$DIR1/${time_chk_f_crt}_TFBUCH1C.$NUM.txt.rvs\" FORMAT=F (SID=MAN CODEOUT=A DSNNEW=$FILENEW)" &amp;gt;$DIR1/TFBUCH1C.$NUM.rvs.tmp&lt;BR /&gt;  /users/rvs/system/rvsbat /i$DIR1/TFBUCH1C.$NUM.rvs.tmp&lt;BR /&gt;  sleep 600;&lt;BR /&gt;  egrep -i ${time_chk_f_crt}_TFBUCH1C.$NUM.txt.rvs /users/rvs/db/rlstat.log&lt;BR /&gt;  if [ $? = 0 ]&lt;BR /&gt;  then&lt;BR /&gt;    echo $DIR1/${time_chk_f_crt}_TFBUCH1C.$NUM.txt.rvs succesfully SEND... `date`&amp;gt;&amp;gt;$DIR0/rvs_sap_send_log&lt;BR /&gt;    rm -Rf *.$NUM.rvs.tmp&lt;BR /&gt;    rm -Rf *.$NUM.txt.rvs&lt;BR /&gt;    rm -Rf *.$NUM.rcp&lt;BR /&gt;    rm -Rf *.$NUM.txt&lt;BR /&gt;    rm -Rf *.$NUM&lt;BR /&gt;  else&lt;BR /&gt;    echo $DIR1/${time_chk_f_crt}_TFBUCH1C.$NUM.txt.rvs is WAITING!!!or RVS Error!!! `date`&amp;gt;&amp;gt;$DIR0/rvs_err_log&lt;BR /&gt;  fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This assumes that your variable ${time_chk_f_crt} has no "." characters in, otherwise you'll have to change the cut command accortingly.</description>
      <pubDate>Fri, 10 Jun 2005 09:07:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906821#M405294</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2005-06-10T09:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906822#M405295</link>
      <description>Sorry, the first 3 lines of the script should be:&lt;BR /&gt;&lt;BR /&gt;for FILE in ${time_chk_f_crt}_TFBUCH1C.*.txt&lt;BR /&gt;do&lt;BR /&gt;  NUM=`echo $FILE | cut -d. -f2`&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Basically what it's doing is looping for each file that matches (TFMUCH1C.100, 300, 500 etc.) and using the cut to get the number portion as variable $NUM.  This is then used in the rest of the loop code in place of .100. in your rm's, calls to rvs code etc.&lt;BR /&gt;&lt;BR /&gt;Hope this makes sense?</description>
      <pubDate>Fri, 10 Jun 2005 09:10:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906822#M405295</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2005-06-10T09:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906823#M405296</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Some nice answers&lt;BR /&gt;&lt;BR /&gt;For scripting I always check &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.shelldorado.com" target="_blank"&gt;www.shelldorado.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;           Steve Steel</description>
      <pubDate>Fri, 10 Jun 2005 09:17:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906823#M405296</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2005-06-10T09:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906824#M405297</link>
      <description>Simon,&lt;BR /&gt;i know i do not have loop but i need loop.&lt;BR /&gt;As you seen my script;&lt;BR /&gt;i have a directory and there are some files&lt;BR /&gt;waiting to transfer somewhere (out of country)&lt;BR /&gt;now the rules are;&lt;BR /&gt;the files only *.rcp extension are ready&lt;BR /&gt;to transfer...&lt;BR /&gt;let's say in diretory;&lt;BR /&gt;DVA.E04MAN.TFBUCH1C.100&lt;BR /&gt;DVA.E04MAN.TFBUCH1C.100.rcp&lt;BR /&gt;so this means DVA.E04MAN.TFBUCH1C.100 must&lt;BR /&gt;be transferred but before transfering&lt;BR /&gt;i have to convert this original file&lt;BR /&gt;(you see in my script)&lt;BR /&gt;/users/rvs/system/rvsut2fv $DIR1/${time_chk_f_crt}_TFBUCH1C.100.txt.rvs F 650 $DIR1/${time_chk_f_crt}_TFBUCH1C.100.txt T&lt;BR /&gt;echo "SEND DSN=\"$DIR1/${time_chk_f_crt}_TFBUCH1C.100.txt.rvs\" FORMAT=F (SID=MAN CODEOUT=A DSNNEW=$FILENEW)" &amp;gt;$DIR1/TFBUCH1C.100.rvs.tmp&lt;BR /&gt;/users/rvs/system/rvsbat /i$DIR1/TFBUCH1C.100.rvs.tmp&lt;BR /&gt;so transfers starts...&lt;BR /&gt;Now the trick is here &lt;BR /&gt;i have to check whether transfer succesfully&lt;BR /&gt;finish or not!!!! so &lt;BR /&gt;the control file is rlstat.log which after&lt;BR /&gt;transfers save in here and this file have records like;&lt;BR /&gt;$ pwd&lt;BR /&gt;/users/rvs/db&lt;BR /&gt;$ cat rlstat.log|tail -3&lt;BR /&gt;R  MAN  566182 566187 2005/06/10 15:17:37  DVA.MANE04.MLLC2  /users/rvs/usrdat/taxxxxxx/taxxxxxx.T162149  4623&lt;BR /&gt;S  MAN  566202 566203 2005/06/10 16:30:08  DVA.E04MAN.TFBUCH1C  /sap/TFBUCH1C/2005_06_10_1630_TFBUCH1C.300.txt.rvs  1987&lt;BR /&gt;S  MAN  566221 566222 2005/06/10 17:00:05  DVA.E04MAN.FAVE  /users/rvs/usrdat/fave_gidecek_tmp/fave061005151902.txt.rvs  292&lt;BR /&gt;&lt;BR /&gt;SO that's why i use egrep -i &lt;BR /&gt;&lt;BR /&gt;Now the most important point is the files&lt;BR /&gt;are approx 300MB and that's why i use&lt;BR /&gt;sleep 600;&lt;BR /&gt;but this transfer time may take 20 minutes&lt;BR /&gt;and at this time i can not delete the files&lt;BR /&gt;because when the transfer is Ok i have to &lt;BR /&gt;empty my DIRECTORY...&lt;BR /&gt;&lt;BR /&gt;Now,i how can i set a loop;&lt;BR /&gt;When transfer starts and waits,and  try to see this file untill in rlstat.log file in my script..this is my problem..and &lt;BR /&gt;i think i need a loop...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Jun 2005 09:25:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906824#M405297</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2005-06-10T09:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906825#M405298</link>
      <description>only a link from Steve,&lt;BR /&gt;:-(&lt;BR /&gt;thks,</description>
      <pubDate>Fri, 10 Jun 2005 09:29:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906825#M405298</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2005-06-10T09:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906826#M405299</link>
      <description>Okay, instead of sleep 600 I would replace with something like: -&lt;BR /&gt;&lt;BR /&gt;while [ "`fuser {time_chk_f_crt}_TFBUCH1C.100.txt.rvs`" != "" ]; do&lt;BR /&gt;  sleep 60&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This will use fuser to see if any process has the file open (your file transfer program).  If this returns a PID, then the loop will sleep for 60 seconds then test again.  It will keep doing this until no process has that file open.&lt;BR /&gt;&lt;BR /&gt;You can then perform your grep to confirm the logfile output.</description>
      <pubDate>Fri, 10 Jun 2005 09:35:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906826#M405299</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2005-06-10T09:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906827#M405300</link>
      <description>Or if you do not want to use fuser (which is root only, and may cause it to look forever if someone else is looking at the file):&lt;BR /&gt;&lt;BR /&gt;---------&lt;BR /&gt;&lt;BR /&gt;MAXMINUTES=60&lt;BR /&gt;grep -iq ${time_chk_f_crt}_TFBUCH1C.$NUM.txt.rvs /users/rvs/db/rlstat.log&lt;BR /&gt;while [ $? -ne 0 ]; do&lt;BR /&gt;sleep 60&lt;BR /&gt;(( MAXMINUTES = MAXMINUTES - 1 ))&lt;BR /&gt;if [ $MAXMINUTES -eq 0 ]; then&lt;BR /&gt;  echo "Maximum transfer time reached!"&lt;BR /&gt;  exit 1&lt;BR /&gt;fi&lt;BR /&gt;echo $MAXMINUTES&lt;BR /&gt;grep -iq ${time_chk_f_crt}_TFBUCH1C.$NUM.txt.rvs /users/rvs/db/rlstat.log&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;--------&lt;BR /&gt;&lt;BR /&gt;This will keep checking (every minute) for the filename in the log file.  Every time it checks, it counts MAXMINUTES down 1.  If this reaches zero it errors.&lt;BR /&gt;&lt;BR /&gt;You need the MAXMINUTES in case the script loops forever.  This should be what you need.</description>
      <pubDate>Fri, 10 Jun 2005 09:46:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906827#M405300</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2005-06-10T09:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906828#M405301</link>
      <description>Simon,&lt;BR /&gt;you seem understood me...&lt;BR /&gt;how about this ?&lt;BR /&gt;until [ "`cat rlstat.log|egrep -i ${time_chk_f_crt}_TFBUCH1C.100.txt.rvs|awk '{print $8}'|cut -c-15-` = "${time_chk_f_crt}_TFBUCH1C.100.txt.rvs"&lt;BR /&gt;do&lt;BR /&gt;sleep;&lt;BR /&gt;done&lt;BR /&gt;echo $DIR1/${time_chk_f_crt}_TFBUCH1C.100.txt.rvs succesfully SEND... `date`&amp;gt;&amp;gt;$DIR0/rvs_sap_send_log&lt;BR /&gt;  rm -Rf *.100.rvs.tmp&lt;BR /&gt;  rm -Rf *.100.txt.rvs&lt;BR /&gt;  rm -Rf *.100.rcp&lt;BR /&gt;  rm -Rf *.100.txt &lt;BR /&gt;  rm -Rf *.100&lt;BR /&gt;&lt;BR /&gt;Does it work?</description>
      <pubDate>Fri, 10 Jun 2005 10:00:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906828#M405301</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2005-06-10T10:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: script loop help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906829#M405302</link>
      <description>i have solved the problem like;&lt;BR /&gt;while true; do&lt;BR /&gt; if egrep -i ${time_chk_f_crt}_TFBUCH1C.100.txt.rvs /users/rvs/db/rlstat.log&lt;BR /&gt;  then&lt;BR /&gt;  echo $DIR1/${time_chk_f_crt}_TFBUCH1C.100.txt.rvs succesfully SEND... `date`&amp;gt;&amp;gt;$DIR0/rvs_sap_send_log&lt;BR /&gt;  rm -Rf *.*&lt;BR /&gt;  break&lt;BR /&gt;  else&lt;BR /&gt;  sleep 1&lt;BR /&gt; fi</description>
      <pubDate>Tue, 14 Jun 2005 00:08:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-loop-help/m-p/4906829#M405302</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2005-06-14T00:08:34Z</dc:date>
    </item>
  </channel>
</rss>

