BreadCrumbs: Bash Scripts

Bash Scripts

From Luke Jackson

(Difference between revisions)
Jump to: navigation, search
Revision as of 23:15, 28 June 2007 (edit)
Ljackson (Talk | contribs)

← Previous diff
Revision as of 23:16, 28 June 2007 (edit)
Ljackson (Talk | contribs)
(Simple Wget Loop)
Next diff →
Line 10: Line 10:
while [ "$x" -lt "$alpha_count" ] while [ "$x" -lt "$alpha_count" ]
do # List all the elements in the array. do # List all the elements in the array.
- wget -O ${alpha[$x]}.htm http://german.about.com/library/media/sound/${alpha[$x]}.wav+ wget -O ${alpha[$x]}.wav http://german.about.com/library/media/sound/${alpha[$x]}.wav
sleep 1 sleep 1
let "x = $x + 1" let "x = $x + 1"

Revision as of 23:16, 28 June 2007

Simple Wget Loop

alpha=( aa bb cc dd ee ff gg hh ii jj kk ll mm nn oo pp qq rr ss tt uu vv ww xx yy zz )

alpha_count=${#alpha[*]}

x=0

while [ "$x" -lt "$alpha_count" ]
do    # List all the elements in the array.
  wget -O ${alpha[$x]}.wav http://german.about.com/library/media/sound/${alpha[$x]}.wav
  sleep 1
  let "x = $x + 1"
done
Personal tools