Ad Widget

Collapse

UserParameter - Not Supported - How then?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • benjaminconnelly
    Junior Member
    • Jul 2012
    • 12

    #1

    UserParameter - Not Supported - How then?

    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?
  • benjaminconnelly
    Junior Member
    • Jul 2012
    • 12

    #2
    here is how

    curl -s --data 'username=blah&password=blah&action=login' 'http://192.x.x..x/zm/index.php?skin=xml' | grep -Po '<RUNNING>\K.*?(?=<.*?>)'

    Comment

    Working...