need shell script to copy 1.gif to 1-100.gif
Need to copy a blank .gif file called 1.gif to 1.gif, 2.gif, 3.gif etc up to a 100.gif.
Could someone provide me with a script to achieve that as I really don't want to do it manually. Thanks, |
man seq
man xargs leads to seq 1 100|xargs -iN cp blank.gif N.gif |
Does the following do what you want?
Code:
#!/bin/bash |
Almost there but it actually makes em 001.gif, 002.gif
I don't want the zeroes in front of em cause the links wouldn't work. Thanks. |
This one worked btw
seq 1 100|xargs -iN cp blank.gif N.gif Thanks for your help guys! |
I don't want the zeroes in front of em
If you read man seq you see that's because of -w (equal width). I'm having a run on posting too slowly today Quality counts, speed doesn't IMHO. |
eg:
for i in `seq 1 10`; do cp t.gif $i.gif; done |
All times are GMT -5. The time now is 03:20 PM. |