-
-
Save MikeeI/e04bbaabec39e6beb18590e8e9e041ef to your computer and use it in GitHub Desktop.
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
#!/usr/bin/bash | |
# Finde alle Filmordner | |
MOVIES=$(find . | grep STREAM$) | |
# Für jeden Film: | |
for M in $MOVIES | |
do | |
# Liste alle Filmdateien auf | |
FILES=$(ls $M/*.m2ts) | |
# Extrahiere den Namen | |
NAME=$(echo $M | sed -r "s/[^\/]*\/([^\/]*)\/STREAM/\1/") | |
# mkvmerge-Kommando | |
COMMAND="yes no | mkvmerge " | |
for F in $FILES | |
do | |
# Datei anhängen | |
COMMAND=$COMMAND+$F" " | |
done | |
# Ausgabepfad setzen | |
COMMAND=$COMMAND" -o "$M"/../"$NAME".mkv" | |
# Eigentlich ausführen, aber hier nur Trockenübung | |
echo $COMMAND | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment