shell counter
#!/bin/sh
file=.number
epochFile=.epoch
logFile=work.log
num=0
if [ -f $file ];then
num=`cat $file`
num=`expr $num + 1`
echo "number : $num"
echo -n $num > $file
else
echo -n "0" > $file
fi
epoch3MinAgo=`date +%s`
epochNow=`date +%s`
last=$epochNow
if [ -f $epochFile ];then
last=`cat $epochFile`
echo "yes epoch file,last : $last"
else
echo -n
shell counter最先出现在Python成神之路。
共有 0 条评论