Posted by & filed under Uncategorized.

Q. Can you POST the xml from that $LOG file to this $URL when it is logged, in near real-time?
A. Yes, and it just takes one line, since the xml is logged as one line:

while read line; do echo "$line" | curl -X POST -d "@-" http://$URL/ ; done < <(tail -F $LOG | grep "xml version")

Leave a Reply

  • (will not be published)