Quantcast
Viewing all articles
Browse latest Browse all 15

Create a named pipe / fifo that executes a command when read

I’m looking to supply a process that only reads from a local file with content from an http URL. The process is a daemon that is hard-coded to read a specific file in it’s current working directory and reads it whenever a particular event happens.

I have no control over the event that triggers the file read and I want to supply near real time data instead of constantly dumping data via a curl script to the file.

What I thought might work would be a fifo that executes a command whenever it is read. This would then be connected to netcat or curl to retrieve the contents of the URL (xml data). Is this possible?


Viewing all articles
Browse latest Browse all 15

Trending Articles