I have a large number of files in a folder each with the date as the filename.
For example
20130101
20130102
20130103
.
.
.
20130131
similarly for other months 20130201 to 20130230, the pattern is [Year][Month][Day].
I need to make a tar file of the first fifteen files from JAN to APRIL
(i.e 2013[01-04][01-15]
), since double digit number range is not allowed in grep
. How should I search this pattern?
Best Answer
With
zsh
:If you have to use
bash
: