Created
April 13, 2018 14:12
-
-
Save benwei/10fcadde4b094bad95ce9d8493f561a8 to your computer and use it in GitHub Desktop.
trim space chars in txt filename in current directory
This file contains hidden or 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
| find *.txt | grep " " | while read fn ; do xfn=`echo $fn | tr -d ' '`; mv "$fn" "$xfn" ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment