On 14 Nov 2015, at 11:30, Chris Walker <alug_cdw@the-walker-household.co.uk> wrote:

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?

Chris's solution is a fine one, but just for completeness:

nocasematch is for `case` and `[[`. For your purposes you'd want nocaseglob. For example:

$ shopt -s nocaseglob
$ shopt nocaseglob
nocaseglob      on
$ ls *ts
1.ts 2.TS

The `tr` command is for changing characters, for example:

$ ls | tr 'TS' 'ts'
1.ts
2.ts

That's not ideal here, because you want the case insensitivity to apply to the matching, not the output.

You could also use some other command to select the files. For example:

$ for file in $(find . -iname '*.ts' -maxdepth 1); do echo $file ; done
./1.ts
./2.TS

-- Martijn