On Wednesday 17 December 2008, 23:01, Neil Bothwick wrote: > On Wed, 17 Dec 2008 08:48:52 +0000, Mick wrote: > > Hmm, I tried this with a sequence of files that look like > > name0001stat.txt to name0198stat.txt, but when I run {0001..0198} it > > fails because it seems to ignore the zeros in 0001 and start > > counting from 1. Do I need to use some escape character for this? > > No,you just need to use a better shell than bash :P
Or just use one of: seq -f '%04g' 1 198 printf '%04d\n' {1..198} name????stat.txt (although this might match more files than wanted)