回复 6# myguangzhou 没用的,如果那样写进TXT的只有*/Service的目录列表find */Service -type d > LIST_DIR.txt#Compress & Deletewhile read line; do cd $line rm *.txtdone < LIST_DIR.txt目录是记到TXT中了,但执行脚本到cd $line时,每次都是:rm: ...
显示全部回复 6# myguangzhou 没用的,如果那样写进TXT的只有*/Service的目录列表
find */Service -type d > LIST_DIR.txt
#Compress & Delete
while read line; do
cd $line
rm *.txt
done < LIST_DIR.txt
目录是记到TXT中了,但执行脚本到cd $line时,每次都是:
rm: *.txt: A file or directory in the path name does not exist.
compress_W73RWK_manual.sh[8]: CLIENT001/Service: not found.
rm: *.txt: A file or directory in the path name does not exist.
compress_W73RWK_manual.sh[8]: SJWDAH001/Service: not found.
这就是cd到目录的结果,还是无法实现功能
收起