Hello,
I need help writing a script that will use the touch -r in
[CC]ddmmyyyy HH:mm format.
Basically I have to go into a directory and give all of the files their original time stamp, hence the touch -r command. But where to start ?
I was planning on using this:
date=$([CC]ddmmyyyy HH:mm:ss)
grep date /directory/XXX
if date -ne [CC]ddmmyyyy HH:mm:ss
then touch -r
fi
OR create a loop ??************
for date=03-22-02 /X/xxxx
do touch -r [CC]ddmmyyyy HH:mm:ss
echo "changing format of date"
done
what is the best way to come up with something like this ?
thanks so much