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
| # List all folders in a given directory ($1) | |
| # Source directory contains directories like "my dir - a description" | |
| # We will remove it 2 steps: | |
| # => Remove the spaces | |
| # => Replace .-. in a simple dash. | |
| # => See https://unix.stackexchange.com/questions/86722/how-do-i-loop-through-only-directories-in-bash | |
| for d in $1*/ ; do | |
| echo "current: $d" | |
| #rename ' - ' '-' $d # doesn't work on windows, even with bash install. rename require to install through apt-get. | |
| #rename ' ' '.' $d # doesn't work on windows, even with bash install. rename require to install through apt-get. |
OlderNewer