Created
December 20, 2018 06:37
-
-
Save lzjluzijie/50a2bf8fc11d1a47c3ab3bc2a07e2939 to your computer and use it in GitHub Desktop.
youku-rename
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
cd files | |
for file in `ls` | |
do | |
if [ ${#file} == "73" ]; then | |
new=${file:0:71}00.ts | |
fi | |
if [ ${#file} == "75" ]; then | |
new=${file:0:71}0${file:71:4} | |
fi | |
if [ ${#file} == "76" ]; then | |
new=$file | |
fi | |
echo $new | |
mv $file $new | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment