In bash, we can use a sequence expression
to list files within a specific range. For example
$ echo file{18..21}.txt file18.txt file19.txt file20.txt file21.txt
The sequence expression takes the form {x..y[..incr]}
, where x and y are either integers or single characters, and incr, an optional increment, is an integer. It is part of Bash's brace expansion feature.
Ref:
Possible use cases:
ls file{18..21}.txt
for file in file{18..21}.txt ...
tags | list file names with a range