[plug] clone files - increment name

Keith Bawden keith at bawdo.com
Mon Jul 28 20:27:21 WST 2008


On Mon, Jul 28, 2008 at 19:15, Anthony Woods <anthony at monkey.id.au> wrote:
> for i in `seq -w 1 100`;do cp image.jpg image$i.jpg;done
>

Same thing but using brace expansion and adding the leading zeros your
example had:

for i in {1..100} ; do cp image.jpg `printf "image%03d.jpg" $i` ; done

Regards, Keith



More information about the plug mailing list