2
Bashの変数に出力を割り当てる
私はcURLの出力を次のような変数に割り当てようとしています: #!/bin/sh $IP=`curl automation.whatismyip.com/n09230945.asp` echo $IP sed s/IP/$IP/ nsupdate.txt | nsupdate ただし、スクリプトを実行すると、次のようになります。 ./update.sh: 3: =[my ip address]: not found 出力を$IP正しく取得するにはどうすればよいですか?