for i in $(seq --format="%02.f" 1 17); do
echo "wget http://archive.leasticoulddo.com/strips/200904$i.gif";
done
Friday, April 17, 2009
for loop with numbers in bash
Lately, I was trying to download back issues of web comics. Bash supports for loops with numbers, but I needed leading zeros. Apparently the seq command can do this. Here's the loop I used:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment