[plug] clone files - increment name

Keith Bawden keith at bawdo.com
Mon Jul 28 20:31:47 WST 2008


On Mon, Jul 28, 2008 at 21:27, Keith Bawden <keith at bawdo.com> wrote:
>
> for i in {1..100} ; do cp image.jpg `printf "image%03d.jpg" $i` ; done
>

I forgot to mention if you use zsh instead of bash the above becomes a
little simpler:

for i in {001..100} ; do cp image.jpg  image${i}.jpg  ; done

Regards, Keith



More information about the plug mailing list