- 论坛徽章:
- 0
|
回复 8# zooyo
之前是没领悟精神,后来想了下就是那么一回事,只不过在solaris下面处理时间有点困惑
最后搞了个perl实现的哈哈
TestTime=`date +%m%d%H%M`
PERIODVALUES=`expr ${PERIOD} \* 60`
cat >./TestDate.pl <<EOF 2>&1
#!/usr/bin/perl
use POSIX(strftime);
\$t = time() ;
\$date = strftime("%m%d%H%M", localtime(\$t-$PERIODVALUES)) ;
print "\$date\n";
EOF
chmod 777 ./TestDate.pl
TestValues=$(./TestDate.pl)
touch -t $TestValues temp1
touch -t $TestTime temp2
rm TestDate.pl
find . \( ! -name "." -type d \) -prune -o -name "*" -newer temp1 ! -newer temp2 -print | sed '/\.0$/d' | sed 's/\.\///g' | grep -v temp2 >$tmpfile
rm temp1 temp2
fi
谢谢!!! |
|