Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- WEBSITE=$1
- shift 1
- if [ $1 == "-t" ]
- then
- time=$2
- shift 2
- else
- time=5
- fi
- command=$*
- old=plik1
- new=plik2
- wget $WEBSITE -O $new -q
- while true
- do
- mv $new $old
- sleep $time
- wget $WEBSITE -O $new -q
- if [ $new -nt $old ]
- then
- $command
- else
- echo no change
- fi
- done
Add Comment
Please, Sign In to add comment