Why I like Linux – reason #42

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… Read more »