The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-04-2007
achararun achararun is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 11
Grepping Errors in a file

Hey All,

I have to grep for an error from a file and get the results of errror in a different file......

But there should be no duplicate entries. Can anyone help me in giving a shell script for this

This is file which contains pattern error which I am supposed to grep and put this in a different file....And this should happen everyday

2007-02-01 23:00:18 Error : this file has error
2007-02-05 24:00:00 date : this afiel ca
2007-02-01 13:00:00 Error : Hi again
2007-02-04 23:00:00 Error : this is again a error
2007-02-04 15:05:00 Error : hi