The following bash script is expected to echo the current ip of the wan, instead of google "what is my ip".
Error:
./ipChange.txt: line 2: +short: command not found “??
#!/bin/bash
ip=dig +short myip.opendns.com @resolver1.opendns.com
echo “$ip”
Any idea how to fix it? Thx