The problem is, this list was generated from a Windows view of the relevant filesystem (It's a NAS) and so the list is not case sensitive. (eg. I have /fs008/Localusers rather than /fs008/LocalUsers)
My question is, is there a simple way to 'convert' the filename that's got the right sequence of characters, but not quite the same case, to the 'correct' filename?
I can'd do anything as simple as converting it all to upper/lower case, because for legacy reasons, our Unix filesystems do include a mix of upper and lower case directories.
I'm fairly confident that there are going to be no 'duplicates' (eg. Having "thisfile" and "ThisFile" in the same directory) since these filesystems are exported via both CIFS and NFS.
The only way I can immediately think of involves generating all possible permutations of case, and testing for the existence of the file.
(Oh, and the filenames have spaces in too, in places. But that's less of a problem)
In reply to case insensitive filename matching by Preceptor
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |