Wednesday, March 17, 2004

Grep & date substitution output

I wanted to grep for log entries in /var/log/messages that are timestamped with today's date. After much looking around, i finally stumbled upon the correct syntax:

grep "$(date +"%b %d")" /var/log/messages