Hi,
Lets say I have a folder with the following jpeg-files:
adfjhu.jpg Afgjo.jpg
Bdfji.jpg bkdfjhru.jpg
Cdfgj.jpg cfgir.jpg
Ddfgjr.jpg dfgjrr.jpg
How do I remove or list the files that starts with a capital?
This can be solved with a combination of find
, grep
and xargs
.
But it is possible with normal file-globbing/pattern matching in bash?
cmd below doesn't work due to the fact that (as far as I can tell) LANG is set to en_US
and the collation order.
$ ls [A-Z]*.jpg
Afgjo.jpg Bdfji.jpg bkdfjhru.jpg Cdfgj.jpg cfgir.jpg Ddfgjr.jpg dfgjrr.jpg
This sort of works
$ ls +(A|B|C|D)*.jpg
Afgjo.jpg Bdfji.jpg Cdfgj.jpg Ddfgjr.jpg
But I don't wanna do this for all characters A-Z for a general solution!
So is this possible?
cheers //Fredrik