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: UPDATE SUMMARY: print leading or trailing lines in grep Date: Thu, 21 Nov 2002 11:07:07 -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 1037905548 31686 80.91.224.249 (21 Nov 2002 19:05:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 21 Nov 2002 19:05:48 +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 18Ewe2-0008Ep-00 for ; Thu, 21 Nov 2002 20:05:47 +0100 Original-Received: (qmail 30216 invoked by uid 5); 21 Nov 2002 19:07:33 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 30197 invoked by uid 49493); 21 Nov 2002 19:07:32 -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.1/5.0):. Processed in 0.579119 secs); 21 Nov 2002 19:07:32 -0000 Original-Received: from unknown (HELO emroute3.ornl.gov) (160.91.4.110) by 0 with SMTP; 21 Nov 2002 19:07:31 -0000 Original-Received: from emroute3.ornl.gov (localhost [127.0.0.1]) by emroute3.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H5X009IXX4ITL@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 21 Nov 2002 14:07:31 -0500 (EST) Original-Received: from mailhost2.us.anritsu.com (mailhost2.us.anritsu.com [65.192.11.4]) by emroute3.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H5X00C74X4AGE@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 21 Nov 2002 14:07:23 -0500 (EST) Original-Received: from mail pickup service by mailhost2.us.anritsu.com with Microsoft SMTPSVC; Thu, 21 Nov 2002 11:06:35 -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 11:06:30 -0800 Original-Received: by moh-exc-001.main.intgin.net with Internet Mail Service (5.5.2653.19) id ; Thu, 21 Nov 2002 11:07:17 -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 19:06:30.0640 (UTC) FILETIME=[19A62700:01C29191] Xref: main.gmane.org gmane.os.tru64.managers:2531 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:2531 I found the GNU install to be a battle of cc errors when doing configure and make. An easier path was finding a compiled binary on the media : Compaq Tru64UNIX Version 5.1A, Open Source Software Collection, RPM Install (I was hoping to pull it off a Compaq url but couldn't find it) It's the Red Hat Package Manager. Executing 2 commands /mnt/SETUP/RPM-init.ksh /mnt/SETUP/install-grep-2.4.2-4.ksh installed the GNU grep in /usr/local/bin/ . Best Regards, Blake >-----Original Message----- >From: Brehl, Blake >Sent: Thursday, November 21, 2002 8:16 AM >To: Tru64 Mailing List (tru64-unix-managers@ornl.gov) >Subject: SUMMARY: print leading or trailing lines in grep > > >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