scmuser created the topic: Script for time stamp update.
write a batch Script for time stamp update?
sgadmin replied the topic: Re:Script for time stamp update.
[code language=”css”]
data=data.txt
tfile=`cat data.txt |wc -l`
[/code]
for (( i = 2 ; i <= tfile ; i++ ))
do
mfile=`cat $data |head -$i|tail -1|tr -s ” ” ” ” |cut -f8 -d” “`
mdate=`grep -i $mfile $data|tr -s ” ” ” “|cut -f6,7 -d” “`
myy=`echo $mdate |cut -b 1-4`
mon=`echo $mdate |cut -b 6-7`
mdd=`echo $mdate |cut -b 9-10`
mhh=`echo $mdate |cut -b 12-13`
mmin=`echo $mdate |cut -b 15-16`
mresult=`echo $myy$mon$mdd$mhh$mmin`
touch -t $mresult $mfile
done
- Exploring Cybersecurity Challenges in Cloud Computing - January 14, 2025
- How to save 80% of the Treatment Cost using Medical Tourism? - January 13, 2025
- Best AI tools and websites to travel blogger or travel video & audio creator - January 12, 2025