#cat friends.txt
172.16
192.168
172.31
194.226.128.1
First I have wrote perl script to do that. It was a quick way :-). But today I have found more elegant solution:
#grep -v -f friends.txt access_log>new-file
parameters
- -v, --invert-match
- Invert the sense of matching, to select non-matching lines.
- -f FILE, --file=FILE
- Obtain patterns from FILE, one per line. The empty file contains zero patterns, and therefore matches nothing.
No comments:
Post a comment