Select Script

Dear Members:-
i want to make this script
1- i have a log directory /export/home/roxy/log
2- file name in this directory with this format
filename_DD_MM_YYYY_%H%M%S.log

i want to make script
for example:
# script.sh _09_04_2009_ _10_04_2009_
this script make select to log file into _09_04_2009_ and _10_04_2009_
and sort it by time stamp

thanks in advance

hi,
just a question, why writing a script when you can us "ls -lrt" ?
Maybe i didn't understand what you need, can you explain it better?

Bye

thanks sauron for your reply
but it doesn't make difference for me script or command line
but i didn't know how to make this with ls -ltr
but didn't forget
i want to select _09_04_2009_ and _10_04_2009_ and sorted by time stamp
whatever the way i agree

thanks in advance

i think this shuld work

ls -lrt | egrep "( _09_04_2009_|_10_04_2009_)"

If i understood :smiley:

Bye

sauron
really thanks for your effort helping me