The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
parsing a system log file via the 'date' command
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
parsing a system log file via the 'date' command
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
05-09-2007
aigles
Registered User
Join Date: Apr 2004
Location: Bordeaux, France
Posts: 1,426
Seems that your shell doesn't support pattern syntax
${day#0}
Try:
Code:
day=`date +%d` dt=`date +%b`" "`echo ${day}|
sed
's/^0//'` grep "$dt.*fail" /var/adm/SYSLOG
Jean-Pierre.
aigles
View Public Profile
Find all posts by aigles
Find aigles's past nominations received
Find aigles's present nominations given