linux 批量去除文件名空格

去除空格

for loop in `ls -1 | tr ‘ ‘ ‘#’`

do

mv “`echo $loop | sed ‘s/#/ /g’ `” “`echo $loop |sed ‘s/#//g’ `” 2> /dev/null

done