
mhx
Enthusiast
Oct 3, 2001, 3:26 AM
Post #2 of 3
(16080 views)
|
The easiest thing would be to use perl's inplace editing capability:
perl -i.old -ne '/jpg/i or print' access.log 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. But you can also use the good old grep instead of perl:
grep -iv jpg access.log >access.log.short Hope this helps. -- Marcus
s$$ab21b8d15c3d97bd6317286d$;$"=547269736;split'i',join$,,map{chr(($*+= ($">>=1)&1?-hex:hex)+0140)}/./g;$"=chr$";s;.;\u$&;for@_[0,2];print"@_,"
|