Created
April 2, 2018 05:17
-
-
Save mdstoy/fbe5f83fe09169190faa676bfd8fb6fa to your computer and use it in GitHub Desktop.
Renaming files that contain spaces in the file names
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
#!/bin/bash | |
for f in *.mp3; do mv "${f}" $(echo ${f} | awk '{print $1 ".mp3"}'); done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script is too simple.
For example, Extraction of file names is not considered other than extension.
If you need to rename with a more complex specification, you will rewrite it.