공부
[Sh] Assign output to variable
승가비
2020. 4. 16. 22:04
728x90
#!/bin/bash
IP=$(curl automation.whatismyip.com/n09230945.asp)
echo "$IP"
https://stackoverflow.com/questions/8737638/assign-output-to-variable-in-bash
Assign output to variable in Bash
I'm trying to assign the output of cURL into a variable like so: #!/bin/sh $IP=`curl automation.whatismyip.com/n09230945.asp` echo $IP sed s/IP/$IP/ nsupdate.txt | nsupdate However, when I run the
stackoverflow.com
728x90