[plug] clone files - increment name

Gavin Chester gavin.chester at gmail.com
Mon Jul 28 18:50:58 WST 2008


On Mon, 2008-07-28 at 18:14 +0800, Nick Bannon wrote:
> On Mon, Jul 28, 2008 at 06:06:08PM +0800, Gavin Chester wrote:
> > I'm stumped how to best approach this problem? Say, I have a single
> > graphic image (jpg) and I want 100 identical clones of it, but of course
> [...]
> 
> for i in `seq -w 1 100`; do
>   cp -p image.jpg image$i.jpg
> done
> 
> Try "seq 1 15" and "seq -w 1 15" on their own, too, to see what they do.
> 
> Nick.

Brilliant thanks, Nick! :-) The last bit preempted my next dilemma being
how to start the incrementing from a predetermined value, say 25, and
end at another predetermined value. So, I was able to change it to start
cp at image25.jpg and end at image75.jpg. Many thanks :-)

BTW: in case anyone's curious I'm helping my kid generate an animation
for homework.

Gavin  




More information about the plug mailing list