#!/bin/csh -f
# Script to filter stdin to stdout, stripping out lines that look like 
# log httpd server log lines for GIF files, CSS files, and other noise.

# Without the --line-buffered option, grep buffers its output.
# So when used in a pipe, it may never actually emit anything out of 
# the end of the pipe until the data stream ends.  That's fine for 
# batch processes, and it's more efficient.  But, it's a problem 
# when feeding in live data like tail -F and expecting to see output 
# immediately.  Especially when used with other pipe elements that 
# buffer their output (grep, sed, others?).  Until all of the buffers
# of the entire pipe fill up, you get no output.  And if you kill the
# process with Ctrl-C (since tail -F never ends), any buffered output
# is lost.
set grep = "grep --line-buffered"
$grep -v -i "\.gif " \
| $grep -v -i "\.css " \
| $grep -v -i "\.ico " \
| $grep -v -i "^::1.*internal dummy connection" \