I'm writing a script to pull some stuff out of /var/log/messages by 
date.  I am having problems finding any entries with a single digit date 
because the messages file dates look like this:
Mmm<space><space>d for single digit dates.  The output of 
YESTERDAY=`date --date='yesterday'|cut -c 5-10`; echo $YESTERDAY gives 
me Mmm<space>d for single digit dates.  Therein lies the problem - grep 
is looking for Nov 3 with one leading space while the messages file has 
Nov  3 with two leading spaces.  Gotta be a way to do this, I'm just not 
smart enough to figure it out.  Pretty sure most of you guys are . . .

-- 
frank hunt
(L0F) R0B-ZAR1
befuddled linux admin
erstwhile photographer
hillsboro oregon

_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to