From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Brehl, Blake" Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: print leading or trailing lines in grep Date: Thu, 21 Nov 2002 08:15:30 -0800 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1037895250 16470 80.91.224.249 (21 Nov 2002 16:14:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 21 Nov 2002 16:14:10 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 18Etxq-0004Gb-00 for ; Thu, 21 Nov 2002 17:14:02 +0100 Original-Received: (qmail 9574 invoked by uid 5); 21 Nov 2002 16:15:49 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 9565 invoked by uid 49493); 21 Nov 2002 16:15:48 -0000 Original-Received: from Blake.Brehl@anritsu.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.51. spamassassin: 2.50-cvs. Clear:SA:0(-5.9/5.0):. Processed in 0.429402 secs); 21 Nov 2002 16:15:48 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (128.219.159.41) by 0 with SMTP; 21 Nov 2002 16:15:48 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H5X0059VP6A7E@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 21 Nov 2002 11:15:47 -0500 (EST) Original-Received: from mailhost2.us.anritsu.com (mailhost2.us.anritsu.com [65.192.11.4]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H5X00LJXP64CI@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 21 Nov 2002 11:15:41 -0500 (EST) Original-Received: from mail pickup service by mailhost2.us.anritsu.com with Microsoft SMTPSVC; Thu, 21 Nov 2002 08:14:53 -0800 Original-Received: from moh-exc-001.main.intgin.net ([172.26.1.92]) by mailhost2.us.anritsu.com with Microsoft SMTPSVC(5.0.2195.3779); Thu, 21 Nov 2002 08:14:50 -0800 Original-Received: by moh-exc-001.main.intgin.net with Internet Mail Service (5.5.2653.19) id ; Thu, 21 Nov 2002 08:15:36 -0800 Original-To: tru64-unix-managers@ornl.gov X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Mailer: Internet Mail Service (5.5.2653.19) X-OriginalArrivalTime: 21 Nov 2002 16:14:50.0171 (UTC) FILETIME=[1E1750B0:01C29179] Xref: main.gmane.org gmane.os.tru64.managers:2528 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:2528 I received many reply's. This is GNU grep which you can get from their site. Best Regards, Blake >-----Original Message----- >From: Brehl, Blake >Sent: Thursday, November 21, 2002 7:38 AM >To: Tru64 Mailing List (tru64-unix-managers@ornl.gov) >Subject: print leading or trailing lines in grep > > >Good Day Admin's, > >Here's a paste from another list about the grep functionality >in Linux. Is there a way to achieve this in Tru64UNIX? > >START PASTE >>>>>>> >On Linux the grep has the next options: >OPTIONS > -A NUM, --after-context=NUM > Print NUM lines of trailing context after matching > lines. Places a line containing -- between con- > tiguous groups of matches. > -B NUM, --before-context=NUM > Print NUM lines of leading context before matching > lines. Places a line containing -- between con- > tiguous groups of matches. > -C NUM, --context=NUM > Print NUM lines of output context. Places a line > containing -- between contiguous groups of >matches. <<<<<<< END PASTE > >Versions: 5.1 and 5.1A > >Best Regards, > >Blake Brehl >Sr. DBA >Anritsu Company United States >Morgan Hill, CA > This message is intended for the use of the individual/entity to whom it is addressed. This message may contain privileged information exempt from disclosure. If you are not the addressee, distribution or copying of this message, or dissemination of the information contained herein is strictly prohibited. If you should receive this message in error, please destroy it, or return to sender, Thank You