I have multiple folders each one include the following
- a video file
- a folder named
Subs, which include many srt files
How can I use
bash to execute an
mkvmerge command for each folder to merge each mp4 file with all the srt files in its
Subs folder and output an mkv file with the same name as the mp4 file.
for dir in ./* : if (there is an mp4 file) : name = "mp4 file name without the extension, dunno how to do that" mkvmerge -o ./"$dir"/"$name".mkv ./"$dir"/"$name".mp4 "$dir"/Subs/*.srt
How to write that in the terminal?