Thread: Grep
View Single Post
Old Sep 16th, 2004, 10:59 AM   #2
Ashcroft
Programmer
 
Join Date: Sep 2004
Posts: 38
Rep Power: 0 Ashcroft is on a distinguished road
Grep is not really appropriate for realtime analysis of a logfile, look for 'swatch' for a daemon that handles this.

If I understand your second question you want unique matches. The usual way to do this in the shell is to use sort and uniq.

$ grep aaa file | sort | uniq
Ashcroft is offline   Reply With Quote