Hopefully somebody can point out my error with a script.
This is it =================== #! /bin/bash # Script to extract thumbnails from .ts files for use on a Humax machine
set -e # set -x # shopt -s nocasematch
for FILE in *.ts do bname=$(basename "$FILE") dir=$(dirname "$FILE") # extension="${bname##*.}" filenamewoext="${bname%.*}" imagefile="${dir}/""${filenamewoext}.png" ffmpeg -i "$FILE" -vframes 1 -ss 00:01:00 -f image2 "$imagefile" done =================== My problem is that I can sometimes have .ts files and others .TS files so how do I persuade bash to search for both case types?
As you can see, I've tried setting 'nocasematch' but it's commented out as that doesn't seem to work for me. Searching online produced the 'tr' command but how do I apply that, if indeed it is the correct solution?
Any help appreciated.