bash one-liners with multiple pipes
daniel
danstemporaryaccount-FFYn/CNdgSA at public.gmane.org
Tue May 11 14:54:31 UTC 2004
i don't have a lot of traffic on my blog, so i like to keep an xterm open to
watch when some traffic actually does come in. i'd used "tail -f" for the
longest time until i realised that i might be able to do some fun stuff with
grep, sed & awk as well. unfortuneately though, while this works:
tail /path/to/log/file | \
awk '{printf "%s %s\n", $1, $7}' | \
egrep -v "\.(jpg|gif|png|css)" | \
sed -e "s/&requestUrl=.*//"
this doesn't:
tail -f /path/to/log/file | \
awk '{printf "%s %s\n", $1, $7}' | \
egrep -v "\.(jpg|gif|png|css)" | \
sed -e "s/&requestUrl=.*//"
so why is it that i can do a "tail", but not a "tail -f" in this case, but
something as simple as:
tail -f /path/to/log/file | egrep -v "jpg|png"
...does work? what'd i miss?
thanks for any input.
--
the great only appear great because we are on our knees
- james connolly
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list