I want to write a shell script that uses wget to retrieve only certain directories from my webserver. I don't know shell scripting at all, but I'll write something that will give you an idea of what I want:
#!/bin/bash
declare variable int = 1
declare variable str = '000'
begin
wget -l 1
http://www.domain.com/directory/xyz+...z0001orxyz0002
increment int +1
if int > 9 and int < 100
str = '00'
else if int > 99 and int < 1000
str = '0'
else if int > 999 and int < 10,000
str = ''
else
end
loop
exit 0
**end script**
So I want to go through directories xyz0001 thru directory xyz9999