I want to get an integer from XML output from a POST. Here is the command -
curl -s --data 'username=blah&password=blah&action=login' 'http://192.x.x.x/zm/index.php?skin=xml' | sed -n '/<RUNNING>/,/<\/RUNNING>/p' | arg1=`cut -c10` && echo $arg1
$arg1 with either be 1 or 0
How can I do this?
curl -s --data 'username=blah&password=blah&action=login' 'http://192.x.x.x/zm/index.php?skin=xml' | sed -n '/<RUNNING>/,/<\/RUNNING>/p' | arg1=`cut -c10` && echo $arg1
$arg1 with either be 1 or 0
How can I do this?
Comment