Currently, I have a script (log.sh) that can pipe content to the REST API of a logging server as follows
curl -H "content-type:text/plain" -d $1 http://my-logging-server.com/api
Running ./log.sh "Hello world" works
But when I try to do a live tail and pipe the results into my shell script:
tail -f live.log | ./log.sh
I get:
curl: no URL specified!
Why doesn't curl recognise a URL?