Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # This creates an array consisting of lower case letters, indexed
- # from 0
- A=(a b c d e f g h i j k l m n o p q r s t u v w x y z)
- # Every time this loop is run, FILE increments by 1 letter (ie xaa becomes xab)
- for (( i=0 ; $((i<=12)) ; $((i++)) ))
- do
- FILE=xa${A[$i]}
- touch file.tmp #create a temporary file to test the timestamp against FILE.
- #if file.tmp is older than FILE, then FILE is being edited
- if [ -f $FILE ] && [ file.tmp -nt $FILE ] #check that the current file exists and is not being edited
- then
- ftp 80.69.4.241 << FTP_END
- cd centrebet
- put $FILE
- quit
- FTP_END
- else
- sleep 5
- fi
- rm file.tmp #remove the temporary file
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement