运维网's Archiver
论坛
›
Shell/Powershell
› shell删除空格文件
宇文氏
发表于 2018-8-20 13:25:08
shell删除空格文件
shell删除空格文件:
2个关键点:
1、read代表整行,line是变量
2、"line"加双引号
#!/bin/bash
find /aa/*.rar -exec ls {} \; > /log/aa.txt
cat /log/aa.txt | while read line
do
/bin/rm -rf "$line"
done
页:
[1]
查看完整版本:
shell删除空格文件