Created
March 17, 2022 14:22
-
-
Save mark-lumbao/63b773aa5e5e27aed61f7d6118342440 to your computer and use it in GitHub Desktop.
Trim all whitespaces for filenames in the current directory
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/env bash | |
# Trim all whitespaces for filenames in the current directory | |
for f in *; do mv "$f" `echo $f | tr ' ' '_'`; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment