<?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: Help with Unix Bourne Shell Script - Loop in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527146#M728629</link>
    <description>Clay,&lt;BR /&gt;&lt;BR /&gt;I didn't give you enough points so if the&lt;BR /&gt;script works I want to give you 10 points.&lt;BR /&gt;So post another email here.&lt;BR /&gt;&lt;BR /&gt;Laurie</description>
    <pubDate>Fri, 11 May 2001 14:28:52 GMT</pubDate>
    <dc:creator>Laurie A. Krumrey</dc:creator>
    <dc:date>2001-05-11T14:28:52Z</dc:date>
    <item>
      <title>Help with Unix Bourne Shell Script - Loop</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527139#M728622</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I am trying to write a unix script to&lt;BR /&gt;read in the below file:&lt;BR /&gt;&lt;BR /&gt;*************************************&lt;BR /&gt;AUTOSTUFFdsklfdskl&lt;BR /&gt;Date and Time&lt;BR /&gt;job definition change&lt;BR /&gt;&lt;BR /&gt;     owner:tom&lt;BR /&gt;     jobname: report1&lt;BR /&gt;****************************************&lt;BR /&gt;AUTOSTUFFdsklflkdfkl&lt;BR /&gt;Date and Time&lt;BR /&gt;sendevent issued&lt;BR /&gt;&lt;BR /&gt;      owner:sally&lt;BR /&gt;      jobname: report2&lt;BR /&gt;****************************&lt;BR /&gt;ETC...&lt;BR /&gt;&lt;BR /&gt;I want my script to just report an output&lt;BR /&gt;file, like an audit report.  I only want to&lt;BR /&gt;copy the information between the "******"&lt;BR /&gt;if the 3rd says "job definition changes", that's when I want to print all the info&lt;BR /&gt;between the "***********".  &lt;BR /&gt;&lt;BR /&gt;In other words, I don't care about the &lt;BR /&gt;sendevent issued stuff, so I don't want to &lt;BR /&gt;print that stuff between the "******".&lt;BR /&gt;&lt;BR /&gt;I am having problems writing a shell script&lt;BR /&gt;to loop within the the "***********"&lt;BR /&gt;&lt;BR /&gt;Thank You,&lt;BR /&gt;Laurie&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 10 May 2001 20:32:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527139#M728622</guid>
      <dc:creator>Laurie A. Krumrey</dc:creator>
      <dc:date>2001-05-10T20:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Unix Bourne Shell Script - Loop</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527140#M728623</link>
      <description>Hi Laurie:&lt;BR /&gt;If it were me, I would do this in awk or perl. It's duck soup in those tools. If you like, when I get to the office in the morning I'll adapt one of my existing awk scripts during my coffee break. If you haven't whipped it by then if you attach a real sample of your input (so the pattern matching is exact) I think I can alter my script in under 5 minutes.&lt;BR /&gt;&lt;BR /&gt;Regards, Clay</description>
      <pubDate>Fri, 11 May 2001 02:28:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527140#M728623</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-05-11T02:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Unix Bourne Shell Script - Loop</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527141#M728624</link>
      <description>awk ' $1 == "****************************************"                                                                              &lt;BR /&gt;{ getline; l1=$0; getline ; l2=$0; getline; l3=$0; getline;getline; l5=$0; getline; l6=$0}                                          &lt;BR /&gt;l3 ~ "job definition change" { print l1                                                                                             &lt;BR /&gt;print l2                                                                                                                            &lt;BR /&gt;print l3                                                                                                                            &lt;BR /&gt;print l5                                                                                                                            &lt;BR /&gt;print l6}' file</description>
      <pubDate>Fri, 11 May 2001 11:08:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527141#M728624</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2001-05-11T11:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Unix Bourne Shell Script - Loop</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527142#M728625</link>
      <description>Here's an exact copy of the input file:&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;autosys2@droopy&lt;BR /&gt;05/07/2001 11:09:57&lt;BR /&gt;autotrack change&lt;BR /&gt;&lt;BR /&gt;level: 1&lt;BR /&gt;::::::::::::::::::::::::::::::::::::::::::&lt;BR /&gt;&lt;BR /&gt;AUTOSYS2@IFTCMSTR&lt;BR /&gt;05/07/2001 11:22:31&lt;BR /&gt;sendevent issued&lt;BR /&gt;&lt;BR /&gt;eoid: ACEz10003652&lt;BR /&gt;job_name: CAP_BERG_BERGER&lt;BR /&gt;command: sendevent "-E" "FORCE_STARTJOB" "-P" "10"&lt;BR /&gt;::::::::::::::::::::::::::::::::::::::::::::::&lt;BR /&gt;&lt;BR /&gt;AUTOSYS2@IFTCMSTR&lt;BR /&gt;05/07/2001 11:23:54&lt;BR /&gt;job definition change&lt;BR /&gt;&lt;BR /&gt;job_name: MOO_FNBO_MON-3&lt;BR /&gt;box_name: MOO_FNBO_MON&lt;BR /&gt;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&lt;BR /&gt;&lt;BR /&gt;AUTOSYS2@IFTCMSTR&lt;BR /&gt;05/07/2001 11:24:05&lt;BR /&gt;job definition change&lt;BR /&gt;&lt;BR /&gt;job_name: MOO_FNBO_MON-4&lt;BR /&gt;box_name: MOO_FNBO_MON&lt;BR /&gt;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&lt;BR /&gt;&lt;BR /&gt;AUTOSYS2@IFTCMSTR&lt;BR /&gt;05/07/2001 11:24:11&lt;BR /&gt;job definition change&lt;BR /&gt;&lt;BR /&gt;job_name: MOO_FNBO_MON-E&lt;BR /&gt;box_name: MOO_FNBO_MON&lt;BR /&gt;::::::::::::::::::::::::::::::::::::::::::::::&lt;BR /&gt;&lt;BR /&gt;AUTOSYS2@IFTCMSTR&lt;BR /&gt;05/07/2001 11:24:17&lt;BR /&gt;job definition change&lt;BR /&gt;&lt;BR /&gt;job_name: MOO_FNBO_MON-E-NFY&lt;BR /&gt;box_name: MOO_FNBO_MON&lt;BR /&gt;:::::::::::::::::::::::::::::::::::::::::::::::&lt;BR /&gt;&lt;BR /&gt;AUTOSYS2@IFTCMSTR&lt;BR /&gt;05/07/2001 11:24:23&lt;BR /&gt;job definition change&lt;BR /&gt;&lt;BR /&gt;job_name: MOO_FNBO_MON-4-NFY&lt;BR /&gt;box_name: MOO_FNBO_MON&lt;BR /&gt;:::::::::::::::::::::::::::::::::::::::::::::::&lt;BR /&gt;&lt;BR /&gt;AUTOSYS2@IFTCMSTR&lt;BR /&gt;05/07/2001 11:24:29&lt;BR /&gt;job definition change&lt;BR /&gt;&lt;BR /&gt;job_name: MOO_FNBO_MON-3-NFY&lt;BR /&gt;box_name: MOO_FNBO_MON&lt;BR /&gt;@&lt;BR /&gt;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&lt;BR /&gt;&lt;BR /&gt;AUTOSYS2@IFTCMSTR&lt;BR /&gt;05/07/2001 11:25:02&lt;BR /&gt;sendevent issued&lt;BR /&gt;&lt;BR /&gt;eoid: ACEz10003653&lt;BR /&gt;job_name: MOO_FNBO_MON-3&lt;BR /&gt;command: sendevent "-E" "FORCE_STARTJOB" "-"10"&lt;BR /&gt;--EOF----&lt;BR /&gt;&lt;BR /&gt;Note: This files begins with autosys2droopy and&lt;BR /&gt;ends without the ::::::::::::::::.&lt;BR /&gt;&lt;BR /&gt;It can be variable length and we only want to&lt;BR /&gt;print out the stuff between the :::::::::::&lt;BR /&gt;if the 3rd line says "job definition change".&lt;BR /&gt;&lt;BR /&gt;THANK YOU SO MUCH...&lt;BR /&gt;Laurie&lt;BR /&gt;</description>
      <pubDate>Fri, 11 May 2001 12:31:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527142#M728625</guid>
      <dc:creator>Laurie A. Krumrey</dc:creator>
      <dc:date>2001-05-11T12:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Unix Bourne Shell Script - Loop</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527143#M728626</link>
      <description>Ok Laurie,&lt;BR /&gt;I'm on my coffee break and I found the script that was close; the mod's took about 2 minutes.&lt;BR /&gt;&lt;BR /&gt;The attached shell script does a 'here docs' to build an awk script then invokes awk to read stdin and write to stdout. I noticed that you changed the delimiters from '*' to ':'.&lt;BR /&gt;&lt;BR /&gt;You would use it something like this:&lt;BR /&gt;laurie.sh &amp;lt; my_infile &amp;gt; my_outfile&lt;BR /&gt;&lt;BR /&gt;Enjoy, Clay&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 May 2001 13:36:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527143#M728626</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-05-11T13:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Unix Bourne Shell Script - Loop</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527144#M728627</link>
      <description>Ok Laurie,&lt;BR /&gt;I'm on my coffee break and I found the script that was close; the mod's took about 2 minutes.&lt;BR /&gt;&lt;BR /&gt;The attached shell script does a 'here docs' to build an awk script then invokes awk to read stdin and write to stdout. I noticed that you changed the delimiters from '*' to ':'.&lt;BR /&gt;&lt;BR /&gt;You would use it something like this:&lt;BR /&gt;laurie.sh &amp;lt; my_infile &amp;gt; my_outfile&lt;BR /&gt;&lt;BR /&gt;Enjoy, Clay&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 May 2001 13:36:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527144#M728627</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-05-11T13:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Unix Bourne Shell Script - Loop</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527145#M728628</link>
      <description>Clay,&lt;BR /&gt;&lt;BR /&gt;I did not get your attached file.&lt;BR /&gt;&lt;BR /&gt;Could you just email it to me at&lt;BR /&gt;&lt;BR /&gt;LAKRUMREY@STATESTREETKC.COM&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Laurie</description>
      <pubDate>Fri, 11 May 2001 14:25:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527145#M728628</guid>
      <dc:creator>Laurie A. Krumrey</dc:creator>
      <dc:date>2001-05-11T14:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Unix Bourne Shell Script - Loop</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527146#M728629</link>
      <description>Clay,&lt;BR /&gt;&lt;BR /&gt;I didn't give you enough points so if the&lt;BR /&gt;script works I want to give you 10 points.&lt;BR /&gt;So post another email here.&lt;BR /&gt;&lt;BR /&gt;Laurie</description>
      <pubDate>Fri, 11 May 2001 14:28:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527146#M728629</guid>
      <dc:creator>Laurie A. Krumrey</dc:creator>
      <dc:date>2001-05-11T14:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Unix Bourne Shell Script - Loop</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527147#M728630</link>
      <description>Sorry, Laurie:&lt;BR /&gt;I got a 'page cannot be displayed' error after replying but if you look at the posting just above (now my 2nd previous , you,ll see the attachment).&lt;BR /&gt;&lt;BR /&gt;If you still have trouble, I'll email you.&lt;BR /&gt;&lt;BR /&gt;Clay&lt;BR /&gt;</description>
      <pubDate>Fri, 11 May 2001 14:32:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527147#M728630</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-05-11T14:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Unix Bourne Shell Script - Loop</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527148#M728631</link>
      <description>sed -n "/job definition changes/,/^:::::/ p"</description>
      <pubDate>Fri, 11 May 2001 15:53:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527148#M728631</guid>
      <dc:creator>David Totsch</dc:creator>
      <dc:date>2001-05-11T15:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Unix Bourne Shell Script - Loop</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527149#M728632</link>
      <description>David, you was robbed. As long as I have been using UNIX I almost never turn to sed and yet it's so powerful,fast, and elegant. For some reason, about the only time I use it in is makefiles which call yacc. I use it to clean up the y.tab.c's and y.tab.h's. Your answer was much better!&lt;BR /&gt;&lt;BR /&gt;Regards, Clay&lt;BR /&gt;</description>
      <pubDate>Fri, 11 May 2001 18:10:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527149#M728632</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-05-11T18:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Unix Bourne Shell Script - Loop</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527150#M728633</link>
      <description>Laurie,&lt;BR /&gt;&lt;BR /&gt;Another way of doing it:&lt;BR /&gt;&lt;BR /&gt;csplit &lt;INPUTFILE&gt; '/^:::::/' '{*}'&lt;BR /&gt;for file in `ls xx*`&lt;BR /&gt;do&lt;BR /&gt;if grep 'job definition change' $file &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;then&lt;BR /&gt;cat $file &amp;gt;&amp;gt; &lt;OUTPUTFILE&gt;&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;rm xx*&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mladen&lt;/OUTPUTFILE&gt;&lt;/INPUTFILE&gt;</description>
      <pubDate>Fri, 11 May 2001 21:45:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-unix-bourne-shell-script-loop/m-p/2527150#M728633</guid>
      <dc:creator>Mladen Despic</dc:creator>
      <dc:date>2001-05-11T21:45:13Z</dc:date>
    </item>
  </channel>
</rss>

