关于linux脚本执行的顺序,下面的代码是不是按照顺序一步一步的执行的啊!
#!/bin/bashcd/dxc/time=$(date-d"yesterday"+"%Y%m%d");mkdir$time;find.-name"*$time*"-e...
#!/bin/bash
cd /dxc/
time=$(date -d "yesterday" +"%Y%m%d");
mkdir $time;
find . -name "*$time*" -exec mv {} ./$time \;
tar -zcvf $time.tar.gz $time;
rm $time;
mv $time.tar.gz a;
rm -rf $time.tar.gz; 展开
cd /dxc/
time=$(date -d "yesterday" +"%Y%m%d");
mkdir $time;
find . -name "*$time*" -exec mv {} ./$time \;
tar -zcvf $time.tar.gz $time;
rm $time;
mv $time.tar.gz a;
rm -rf $time.tar.gz; 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询