I have a script that used to work, which relies on sending commands (file names to be processed in fact) to a process listening on a port, using TCP. So I can fire it up and tell it to listen on, say port 9999.
As a quick hack, I would then set up a stream redirect to port 9999 using a command like:
exec 3<> /dev/tcp/127.0.0.1/9999
and then I could run a find command in the directory I wanted to batch process all of my files, like
find . -name "*.xml" -exec printf "$PWD/{} $PWD/{}\r\n" >&3 \;
I hadn't tried this since I upgraded to Lion, but it doesn't work now, giving me a "Bad File Descriptor" response. Anybody have any ideas?