l would like to display files of the following format :
train_example_X.py
such that X varies from 1 to 9000.
What l have tried ?
ls train_example_[1-17].py
returns only
train_example_1.py
and train_example_7.py
however l'm supposed to get all the files from 1 to 17.
and for :
ls train_example_[3605-3610].py
it returns
train_example_1.py
and train_example_3.py
What is wrong with my command ?
Well, you're using
[...]
there, which is pathname expansion and that supports only ASCII ranges of 0-9 so you'd have to get creative with it or use extended globbingSimpler (imho) approach would be to use brace expansion,