bashhelp
November 23rd, 2005, 08:02 PM
Oh, great! I just typed up my whole message, spell checked it, and the creativity is all gone when I clicked submit, because my login timed out! Here I go again.
Here's the sample script:
#!/bin/bash
echo -n " Link: "
read link
echo -n "Start: "
read start
echo -n " End: "
read end
while test "$start" -le "$end"
do
wget -c $link$start.foo
start=$[start+1]
done
If I were to run this, it would look something like this:
bashhelp@linuxbox ~ $ ./script
Link: http://site.com/dir/file
Start: 1999
End: 2005
How do I get it to behave like this:
Task: [site] [start] [end]
bashhelp@linuxbox ~ $ ./script
Task: http://site.com/dir/file 1999 2005
Once it runs, it will download file1999.foo, file2000.foo, up until it gets to file2005.foo.
Please help?
Here's the sample script:
#!/bin/bash
echo -n " Link: "
read link
echo -n "Start: "
read start
echo -n " End: "
read end
while test "$start" -le "$end"
do
wget -c $link$start.foo
start=$[start+1]
done
If I were to run this, it would look something like this:
bashhelp@linuxbox ~ $ ./script
Link: http://site.com/dir/file
Start: 1999
End: 2005
How do I get it to behave like this:
Task: [site] [start] [end]
bashhelp@linuxbox ~ $ ./script
Task: http://site.com/dir/file 1999 2005
Once it runs, it will download file1999.foo, file2000.foo, up until it gets to file2005.foo.
Please help?