Oct 3, 2001, 3:26 AM
Post #2 of 3
The easiest thing would be to use perl's inplace editing capability:
|This will make a backup (named access.log.old) of access.log and remove all lines from access.log that contain 'jpg', no matter in which case.
perl -i.old -ne '/jpg/i or print' access.log
But you can also use the good old grep instead of perl:
Hope this helps.
grep -iv jpg access.log >access.log.short