- 论坛徽章:
- 0
|
- success=1
- constraint="00,10,20,30,40,50"
- ls -C1 ./pp|xargs -i echo {}|cut -c 1-2|sort -u|while read prefix
- do
- constraint1=$constraint
- while [ ! "${constraint1}" = "" ]
- do
- echo $constraint1|cut -c 1-2|read str1
- echo $constraint1|cut -c 4-|read constraint1
- ls ./pp/${prefix}*${str1}*.txt
- if [ $? -eq 0 ]
- then
- success=1
- else
- success=0
- echo "file constraint not match,${prefix}*${str1}*.txt not exit";
- exit 1;
- fi
- done
- done
- if [ $success -eq 1 ]
- then
- touch ./pp/success.txt
- fi
复制代码 繁琐是繁琐了些,但应该可以满足你的需求 |
|