sh 删除文件名中的空格。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 删除文件名中的空格。相关的知识,希望对你有一定的参考价值。

#!/bin/bash
# My First Script

echo "Bash Script: Replace spaces in filename."

for file in .* *; 
do 
	echo "file $file";

	mv "$file" "${file//_/}";

	echo "$file";
	echo "-----";
done

echo "END."

以上是关于sh 删除文件名中的空格。的主要内容,如果未能解决你的问题,请参考以下文章