The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
simple script help
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
simple script help
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
01-24-2008
ThobiasVakayil
Registered User
Join Date: May 2006
Posts: 53
Hello,
Yiou can find out the latest day and month by using the following command :
day=`ls -lrt *.log | tail -1 | awk '{printf("%2d",$7)}'`
mon=`ls -lrt *.log | tail -1 | awk '{print $6}'`
for file in `ls -l *.log | grep "$mon $day"
do
...
done
ThobiasVakayil
View Public Profile
Find all posts by ThobiasVakayil