Created
September 20, 2015 08:44
-
-
Save devynspencer/233d241bbab4d4538827 to your computer and use it in GitHub Desktop.
Example highlighting the use of a for loop to rename all file beginning with 720 and not ending with .mp4
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
for i in $(ls 720^*.mp4); do | |
mv $i{,.mp4} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An alternative using
find
:Note: this doesn't exclude files ending with '.mp4' as above