[oclug] sed (regexp) help needed

daniel gabriel at trytel.com
Thu Jul 24 09:58:57 EDT 2003


i'm trying to do what i thought was a pretty simple one-liner in sed:  parse a 
log file and take out any references to my local ip so webalizer can run and 
not show local results.  this is what i tried:

  sed -e s/^192\.168\.1\.2.*// mysite.com.log

but it doesn't work. instead, it deletes the content on the lines, but not the 
newline (\n).  adding a "\n" to the end of the expression doesn't work 
either.  anyone care to fill me in as to what i missed?

-- 
when the government fears the people, there is liberty.
when the people fear the government, there is tyranny.
	- thomas jefferson




More information about the OCLUG mailing list