誰能推薦一種安全的解決方案,從給定的根目錄開始,用文件名和目錄名中的下劃線遞歸替換空格?例如:$ tree.|-- a dir| `-- file with spaces.txt`-- b dir |-- another file with spaces.txt `-- yet another file with spaces.pdf變成:$ tree.|-- a_dir| `-- file_with_spaces.txt`-- b_dir |-- another_file_with_spaces.txt `-- yet_another_file_with_spaces.pdf
如何使用bash腳本替換文件名中的空格
寶慕林4294392
2019-12-07 14:20:26