SyntaxFix
Write A Post
Hire A Developer
Questions
In shell, you don't put a $ in front of a variable you're assigning. You only use $IP when you're referring to the variable.
#!/bin/bash IP=$(curl automation.whatismyip.com/n09230945.asp) echo "$IP" sed "s/IP/$IP/" nsupdate.txt | nsupdate