How can I list files with a filename ending with last character and with .txt extension ?I have tried ls *+([[:digit:]]).txt but this is true for abc12.txt and abc2.txt.But I need to get only abc2.txt. How can I do that?Is there any sort form of :digit: that will do this?
Listing with `ls` and regular expression
bash;wildcards
How about:ls *[!0-9][0-9].txtThe ! at the beginning of the group complements its meaning.