Skip to content

Instantly share code, notes, and snippets.

@cjus
Created July 18, 2011 19:19
Show Gist options
  • Save cjus/1090383 to your computer and use it in GitHub Desktop.
Save cjus/1090383 to your computer and use it in GitHub Desktop.
Shell script to query REST server and parse XML node
#!/bin/bash
echo 'XML data monitor. Type CTRL-C to stop'
while :
do
d=`date`
s=`curl -X GET -s http://aserver:4300/server/callqueue/xml | cut -c2-60 | cut -d'>' -f1`
echo $d ' | ' $s
sleep 2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment