Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- NewIP=$(example.dy.fi | cut -d ' ' -f4)
- echo "Uusi IP: $NewIP"
- CurIP=$(cat current.txt)
- echo "Vanha IP: $CurIP"
- if [ $NewIP = $CurIP ] ; then
- echo "Ei oo vaihtunna IP, myö en tee mittää."
- else
- echo "Myö päivittelen, on vaihtunna IP..."
- echo $NewIP > current.txt
- echo $NewIP >> allips.txt
- fi
Advertisement
Add Comment
Please, Sign In to add comment