Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google site



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 !!

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
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.
Sponsored Links
  #2 (permalink)  
Old 10-05-2005
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
 

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

vino
  #3 (permalink)  
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.
  #4 (permalink)  
Old 10-05-2005
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,814
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.
  #5 (permalink)  
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.
  #6 (permalink)  
Old 10-05-2005
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,814
Post the results of
Code:
`which grep`

Looks like your grep is still the non-GNU grep.
  #7 (permalink)  
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.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


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 10:19 AM
Archive lets users search through software/shareware. - ThomasNet Industrial News Roo Linux Bot UNIX and Linux RSS News 0 08-20-2007 10:30 AM
Archive lets users search through software/shareware. - ThomasNet Industrial News Roo Linux Bot UNIX and Linux RSS News 0 08-20-2007 10:10 AM
Free Shareware for UNix. iwegbue3 UNIX for Dummies Questions & Answers 1 06-27-2005 08:54 AM
File Compare Shareware?? tonyo61 UNIX for Dummies Questions & Answers 2 11-22-2000 11:46 AM



All times are GMT -4. The time now is 04:04 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0