#!/bin/bash
date=($*)
#date=($1 $2 $3)
for i in ${date[*]}
do
echo $i
path='/data/ShareData/'$i
num=`find $path -type f -name "*STK*.tar.xz" -o -name "*SZT*.tar.xz"|wc -l`
echo $num
echo "start cp"
find $path -type f -name "*SZT*.tar.xz" -exec cp {} /home/junze/workspace/data/ \;
# find $path -type f -name "*SZT*.tar.xz"
find $path -type f -name "*STK*.tar.xz" -exec cp {} /home/junze/workspace/data/ \;
# find $path -type f -name "*STK*.tar.xz"
ls /home/junze/workspace/data/ |wc -l
echo "cp end"
done
Shell,循环,数组样例
最新推荐文章于 2024-09-09 22:12:22 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)