Redirect File Writes?
I have a program that is updating a text file located on a samba share. I need to capture this data and perform various operations on it.
I was going to write a program that monitors the text file and reads the data out of it as it gets written. While this seems like the simplest way to accomplish this, I was wondering if it's possible to redirect these file writes directly to a program or device rather than opening and reading the text file. In other words, can I have samba send the file data directly to my parsing program rather than to the file system??? If not, can I have samba write it to a device like a com port?
It sounds kinda nuts but with Linux, I figure nearly anything is possible.