Created
April 16, 2017 15:27
-
-
Save anonymous/77884257ff68412f2a06b1aceec91e2e to your computer and use it in GitHub Desktop.
split.sh
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/bash | |
path=$HOME/Downloads/Mono | |
unsort=$HOME/Downloads/Unsorted | |
for dir in $path/*; | |
do | |
#зайти к каждую директорию и запустить split2flac | |
cd "$dir" && split2flac *.flac; | |
for sub in $dir/*; | |
do | |
#для каждой поддиректории проверить, является ли она директорией, и если да | |
if [ -d "$sub" ] ; then | |
#зайти туда и перенести все содержимое в $unsort — НЕ РАБОТАЕТ | |
cd "$sub" && mv * $unsort; | |
fi | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment