I'm trying to make a script that will merge two subtitles.
file.srt
file.forced.srt
file2.srt
file2.Forced.srt
I have a case insensitive for matching both forced subtitles.
shopt -s extglob
shopt -s nocaseglob
for file in "${1%/}/"*forced.srt; do
echo File: "$file"
done
I have this code to remove forced string from the filename, so I get the matching file to use in my script
subs=${file//.Forced/}
How can I remove this string forced from my variable, case insensitive?
.srtfiles are listed when the goal is to merge only two files.