Forgive me if this has been posted, but I could not find them.
I have thousands of files from a permutation as:
intersect-1234.tab
intersect-9914.tab
intersect-0123456.tab
intersect-9134512.tab
......
Basically there are two groups, one is the
intersect-[0-9][0-9][0-9][0-9].tab
and the other is
intersect-[0-9][0-9][0-9][0-9][0-9][0-9].tab
When I tried command:
ls intersect-[0-9]\{4\}.tab
or
ls intersect-[0-9]\{6\}.tab
neither worked but with error message:
ls: cannot access intersect-[0-9]{6}.tab: No such file or directory
It seems my regex is fine as when I used pipeline:
ls *.tab | grep intersect-[0-9]\{6\}.tab
I must have missed something with the regex for ls? Anyone please give me clue?
Thanks for help!