The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Using Grep within a UNIX Script lisa_0801 UNIX for Dummies Questions & Answers 6 04-21-2008 06:19 AM
Archive lets users search through software/shareware. - ThomasNet Industrial News Roo iBot UNIX and Linux RSS News 0 08-20-2007 06:30 AM
Archive lets users search through software/shareware. - ThomasNet Industrial News Roo iBot UNIX and Linux RSS News 0 08-20-2007 06:10 AM
Free Shareware for UNix. iwegbue3 UNIX for Dummies Questions & Answers 1 06-27-2005 04:54 AM
File Compare Shareware?? tonyo61 UNIX for Dummies Questions & Answers 2 11-22-2000 08:46 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 10-05-2005
Registered User
 

Join Date: Jul 2005
Posts: 4
Unix Shareware with the -B and -A grep fuctionality

Hi,

Can anyone help me or tell me how I can get a unix shareware that will allow me use grep with the following flags -A and -B. the version of Unix we have dont have this.

I am doing a grep on a log to capture any error but I want what is returend to be more meaningful.

Thanks

Amen.
Reply With Quote
Forum Sponsor
  #2  
Old 10-05-2005
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,699
GNU grep has those flags. Use the link and get the required version.

vino
Reply With Quote
  #3  
Old 10-05-2005
Registered User
 

Join Date: Jul 2005
Posts: 4
Thank you so much. I havve been able to download the files. and I have used gunzip to unzip the files. I am new to this. I am trying to install this in my unix or AIX environment by running e.g by typing grep-2.5.1.tar at the command prompt and i get a permission denied error. I have used the chmod to give read write and execute access to the file.

What do I do next. I am really new at this.

Thanks.
Reply With Quote
  #4  
Old 10-05-2005
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,699
Its a tar'ed file. You need to untar it.

tar xvf grep-2.5.1.tar

That will extract grep into the directory where you are running the command from. Since grep is a command run quite frequently, you might have to untar it into a directory which is there in the PATH. Or replace the existing non-GNU grep with the new one.

That decision is yours.
Reply With Quote
  #5  
Old 10-05-2005
Registered User
 

Join Date: Jul 2005
Posts: 4
I did all that and I am still not able to use the flag.

this is the message I get when I do a man grep -A

[/home/user:]grep -A
grep: Not a recognized flag: A
Usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] -e pattern_list...
[-f pattern_file...] [file...]
Usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] [-e pattern_list...]
-f pattern_file... [file...]
Usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] pattern_list [file...]

What do I do? Please help

Thanks.
Reply With Quote
  #6  
Old 10-05-2005
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,699
Post the results of
Code:
`which grep`
Looks like your grep is still the non-GNU grep.
Reply With Quote
  #7  
Old 10-05-2005
Registered User
 

Join Date: Jul 2005
Posts: 4
here is what i get

/home$`which grep`
Usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] -e pattern_list...
[-f pattern_file...] [file...]
Usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] [-e pattern_list...]
-f pattern_file... [file...]
Usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] pattern_list [file...]


Thanks.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:20 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0