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: print leading or trailing lines in grep Date: Thu, 21 Nov 2002 07:38:16 -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 1037893019 5708 80.91.224.249 (21 Nov 2002 15:36:59 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 21 Nov 2002 15:36:59 +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 18EtNx-0001Tn-00 for ; Thu, 21 Nov 2002 16:36:58 +0100 Original-Received: (qmail 24498 invoked by uid 5); 21 Nov 2002 15:38:41 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 24489 invoked by uid 49493); 21 Nov 2002 15:38:40 -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(-2.4/5.0):. Processed in 0.395394 secs); 21 Nov 2002 15:38:40 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (128.219.159.41) by 0 with SMTP; 21 Nov 2002 15:38:40 -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 <0H5X005J4NGF7E@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 21 Nov 2002 10:38:40 -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 <0H5X009C8NGBWO@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 21 Nov 2002 10:38:36 -0500 (EST) Original-Received: from mail pickup service by mailhost2.us.anritsu.com with Microsoft SMTPSVC; Thu, 21 Nov 2002 07:37:38 -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 07:37:35 -0800 Original-Received: by moh-exc-001.main.intgin.net with Internet Mail Service (5.5.2653.19) id ; Thu, 21 Nov 2002 07:38:22 -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 15:37:35.0921 (UTC) FILETIME=[EA5FD210:01C29173] Xref: main.gmane.org gmane.os.tru64.managers:2527 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:2527 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