You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
407 B
11 lines
407 B
#!/bin/bash
|
|
cd "`dirname $0`"
|
|
if which curl &>/dev/null; then
|
|
curl -s "http://$1/Network.xml?page=1&ip=" | awk '/<address>/{ gsub("<address>","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}';
|
|
elif which wget &>/dev/null; then
|
|
wget -q -O - "http://$1/Network.xml?page=1&ip=" | awk '/<address>/{ gsub("<address>","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}';
|
|
else
|
|
exit 1
|
|
fi
|
|
|