So I\'ve got the following files in the tmp directory:
file.0
file.1
file.t9
file.22
file.4444
if I wanted to list only the files that
You can use ls just to list all the files then filter the output of that through grep:
ls -1 | grep -E '\.[0-9]+$'
as per the following test:
pax> printf 'file.0\nfile.1\nfile.t9\nfile.22\nfile.4444\n' | grep -E '\.[0-9]+$'
file.0
file.1
file.22
file.4444
The -E gives you extended regular expressions so that the + modifier works. If that's not available to you, you can use the \.[0-9][0-9]*$ regex instead.