Archiv verlassen und diese Seite im Standarddesign anzeigen : Bash Skript Problem
Hi,
Warum wird $ip nicht mit dem vorher zugewiesenen Wert ersetzt?
#!/bin/bash
ip=$(curl -s http://checkip.dyndns.org | grep -o [0-9.]*[0-9.])
curl -s http://www.staticcling.org/update.html?login=xxxpass=xxxx&ip=$ip
ip=`curl -s http://checkip.dyndns.org | grep -o [0-9.]*[0-9.]`
ip=`curl -s http://checkip.dyndns.org | grep -o [0-9.]*[0-9.]`
Das ist das gleiche in grün.
Es geht immer noch nicht.
Hier geht es wunderbar...
pc:~> ip=`curl -s http://checkip.dyndns.org | grep -o [0-9.]*[0-9.]`
pc:~> echo $ip
84.128.161.103
Hier geht es wunderbar...
pc:~> ip=`curl -s http://checkip.dyndns.org | grep -o [0-9.]*[0-9.]`
pc:~> echo $ip
84.128.161.103
bei mir ja auch... aber er stopft den Wert der Variable nicht in den Befehl
curl -s http://www.staticcling.org/update.html?login=xxx/pass=xxxx&ip=$ip
rein!
Hat den keiner eine Idee?
curl -s "http://www.staticcling.org/update.html?login=xxxpass=xxxx&ip=$ip"
ansonsten wird wohl das & von der Bash als Sonderzeichen gewertet...
Powered by vBulletin® Version 4.2.5 Copyright ©2024 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.