filepath="/home/res"
flist=`ls $filepath/*a.fits`
for f in $flist
do
if [ ! -f "$filepath/${f:24:8}a.fits" ];then #匹配相同文件名 是否存在?
echo "${f1:24:8}U.fits"
fi
#let num1=$num1+1
#echo ${f1:24:8}
#echo $num1
done
linux shell 判断某个路径下的多个对应文件是否存在?
最新推荐文章于 2024-04-18 03:44:56 发布