Reputation: 26090
Suppose I have a bunch of files, the names of which contain a number, like this: xxx_1.txt, xxx_2.txt, ... xxx_42.txt
In bash, it's easy to operate on subsets of these files, e.g. ls xxx_{1..33}.txt xxx_{35..41}
.
What would be the tcsh analog of this?
Upvotes: 3
Views: 2386
Reputation: 14147
As far as I know there is no built-in mechanism to specify range patterns (except single character ranges) in tcsh
. But you could, for example, use the seq
utility (if it is available) together with sed
:
ls `(seq 1 33; seq 35 41)|sed 's/^/xxx_/;s/$/.txt/'`
Upvotes: 2