<?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: find files between a certain stanza in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026033#M97416</link>
    <description>Or with sed:&lt;BR /&gt;&lt;BR /&gt;# print section of file between two regular expressions (inclusive)&lt;BR /&gt; sed -n '/Iowa/,/Montana/p'             # case sensitive&lt;BR /&gt;&lt;BR /&gt;From "handy one-liners for sed" (attached).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
    <pubDate>Thu, 01 Feb 2007 09:11:03 GMT</pubDate>
    <dc:creator>Pete Randall</dc:creator>
    <dc:date>2007-02-01T09:11:03Z</dc:date>
    <item>
      <title>find files between a certain stanza</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026029#M97412</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;I need help getting information from a file which is between two strings.  Basically I have run a ps -fu&lt;USER&gt; into a file called zombies. I now need to grep all the defunct procs but display the date the command was run.&lt;BR /&gt;here is the script:&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;# check for zombies running&lt;BR /&gt;DATE=`date`&lt;BR /&gt;COUNT=0&lt;BR /&gt;&lt;BR /&gt;if [ -f /usr/dump/JDE/data/in/STU* ] ; then&lt;BR /&gt;&lt;BR /&gt;        while [ $COUNT -lt 30 ]&lt;BR /&gt;        do&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;        echo "\n ####### CHECK PROCS $DATE #########" &amp;gt;&amp;gt;/tmp/zombiecheck.out&lt;BR /&gt;        ps -fucronlog  &amp;gt;&amp;gt; /tmp/zombiecheck.out&lt;BR /&gt;        sleep 10&lt;BR /&gt;        COUNT=$(($COUNT+1))&lt;BR /&gt;        echo "\n ###################################" &amp;gt;&amp;gt; /tmp/zombiecheck.out&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;else &lt;BR /&gt;&lt;BR /&gt;echo "\n ################ NO STU FILES PROCESSED $DATE#####" &amp;gt; /tmp/zombiecheck.out&lt;BR /&gt;&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;so I want to display:&lt;BR /&gt;&lt;BR /&gt;####### CHECK PROCS $DATE #########&lt;BR /&gt;&lt;BR /&gt;defunct &lt;BR /&gt;defunct&lt;BR /&gt;defunct&lt;BR /&gt;etc&lt;BR /&gt;#####################&lt;BR /&gt;&lt;BR /&gt;####### CHECK PROCS $DATE #########" &lt;BR /&gt;&lt;BR /&gt;etc &lt;BR /&gt;etc.&lt;BR /&gt;&lt;BR /&gt;any idea's how I can use awk to achieve this?&lt;BR /&gt;&lt;BR /&gt;many Thanks again guys.&lt;BR /&gt;&lt;BR /&gt;&lt;/USER&gt;</description>
      <pubDate>Thu, 01 Feb 2007 08:19:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026029#M97412</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-02-01T08:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: find files between a certain stanza</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026030#M97413</link>
      <description>Hi Lawrenzo,&lt;BR /&gt;&lt;BR /&gt;How about something simple?&lt;BR /&gt;&lt;BR /&gt;$ grep -E '^#|defunct' &amp;lt; /tmp/zombiecheck.out &amp;gt; /tmp/zombiecheck.out.filtered&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Thu, 01 Feb 2007 08:32:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026030#M97413</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2007-02-01T08:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: find files between a certain stanza</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026031#M97414</link>
      <description>Hi Lawrenzo:&lt;BR /&gt;&lt;BR /&gt;Well, use Perl;&lt;BR /&gt;&lt;BR /&gt;# perl -ne 'print if (/# CHECK/ ... /# CHECK/)' file&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 01 Feb 2007 08:36:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026031#M97414</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-02-01T08:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: find files between a certain stanza</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026032#M97415</link>
      <description>Hi Lawrenzo,&lt;BR /&gt;&lt;BR /&gt;perhaps something like this:&lt;BR /&gt;&lt;BR /&gt;$ awk '$8 ~ /defunct/ {print $5 }' /tmp/zombiecheck.out&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Feb 2007 08:37:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026032#M97415</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2007-02-01T08:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: find files between a certain stanza</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026033#M97416</link>
      <description>Or with sed:&lt;BR /&gt;&lt;BR /&gt;# print section of file between two regular expressions (inclusive)&lt;BR /&gt; sed -n '/Iowa/,/Montana/p'             # case sensitive&lt;BR /&gt;&lt;BR /&gt;From "handy one-liners for sed" (attached).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 01 Feb 2007 09:11:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026033#M97416</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2007-02-01T09:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: find files between a certain stanza</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026034#M97417</link>
      <description>thanks all for the replies,&lt;BR /&gt;&lt;BR /&gt;one thing about all these one liners ...&lt;BR /&gt;&lt;BR /&gt;The information between&lt;BR /&gt;&lt;BR /&gt;####### CHECK PROCS 0102071600 #########&lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt;######################&lt;BR /&gt;&lt;BR /&gt;####### CHECK PROCS 0102071615 #########&lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt;######################&lt;BR /&gt;&lt;BR /&gt;etc etc &lt;BR /&gt;&lt;BR /&gt;Thanks again&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 02 Feb 2007 11:20:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026034#M97417</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-02-02T11:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: find files between a certain stanza</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026035#M97418</link>
      <description>found the solution which works well:&lt;BR /&gt;&lt;BR /&gt;grep -iE "CHECK PROCS $DATE|defunct|#####################" /tmp/zombiecheck.out&lt;BR /&gt;&lt;BR /&gt; ####### CHECK PROCS Thu  1 Feb 12:14:00 2007 #########&lt;BR /&gt; cronlog   64230       1   3                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog   78622       1   3                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  111088       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  172654       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  180328       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  203590       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  353808       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  382260       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  476092       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  492992       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  503154       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  644776       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  649456       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  685918       1   3                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  760000       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  864828       1   2                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  913080       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  927952       1   3                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  959492       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog  982760       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog 1049558       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog 1110456       1   3                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog 1118196       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog 1159696       1   3                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog 1250982       1   3                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog 1296102       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog 1296372       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog 1301488       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog 1359654       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog 1360516       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; cronlog 1379770       1   4                  0:00 &lt;DEFUNCT&gt;&lt;BR /&gt; ###################################&lt;BR /&gt;#&lt;BR /&gt;magic!&lt;BR /&gt;&lt;BR /&gt;Thanks for all the repsonses&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;&lt;/DEFUNCT&gt;</description>
      <pubDate>Mon, 05 Feb 2007 10:08:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026035#M97418</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-02-05T10:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: find files between a certain stanza</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026036#M97419</link>
      <description>cheers</description>
      <pubDate>Mon, 05 Feb 2007 10:09:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-files-between-a-certain-stanza/m-p/5026036#M97419</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-02-05T10:09:16Z</dc:date>
    </item>
  </channel>
</rss>

