Created
December 9, 2017 17:17
-
-
Save jiro4989/f851f039472202234725c193f8a30a59 to your computer and use it in GitHub Desktop.
ファイル名に含まれる空白文字をアンダースコアに変更してリネームするシェルスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# -*- coding: utf-8 -*- | |
for f in * ; do | |
nf=`echo "$f" | sed -E 's/\s/_/g'` | |
mv "$f" "$nf" | |
done | |
ls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment