Arcady Genkin said: > What would be the easiest way to rename a bunch of files > > foo-[0-9]-bar-[0-9][0-9].txt > > into > > blah-[0-9]-[0-9][0-9].txt
mmv is the way to go. It's in the mmv package (imagine that...); just install it (if you haven't already done so) and then mmv "foo-*-bar-*" blah-#1-#2 (The second * will catch both of the trailing digits and the .txt extension and funnel them all into #2. If there are other files which match this pattern that you don't want getting changed, range specifications of [0-9] are accepted by mmv also.) -- Geek Code 3.1: GCS d- s+: a- C++ UL++$ P+>+++ L++>++++ E- W--(++) N+ o+ !K w---$ O M- !V PS+ PE Y+ PGP t 5++ X+ R++ tv- b++ DI++++ D G e* h+ r++ y+