The UNIX and Linux Forums  

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



Thread: grep question
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 04-24-2007
mz043 mz043 is offline
Registered User
 

Join Date: Apr 2007
Posts: 8
grep question

Hi,

I have a log file that I'm trying to tidy up using grep. The log file contains a lot of lines like the ones below:

2> change archivelog all crosscheck;
3> release channel;
4> run
5> {
6>
.
.
.
15> exit;

Also it contains a lot of lines like these:
RMAN-06157 : Message....

How can I use grep to clean up this log?

I tried something like

more logfile | grep -v *> RMAN-0* > cleanlogfile

But didn't work. I am getting an incorrect syntax because (i think) i am searching for a string containing '>'. Enclosing it in quotes didn't work either.

Thanks for your help
Reply With Quote
Forum Sponsor