Is there any way to create a virtual file, such that reading from the file actually reads from the stdout
of a command; writing to the file is acually writing to the stdin
of a command?
So far I have kludged this with an inotifywait
on a file, which calls a command when the file is modified, taking it's input from the file and writing back to it.
I don't like that the inotifywait
has to be constantly restarted though (and I have to ensure that it is always running). I only use this file perhaps twice a week.
rm
andmkfifo
again. If the named pipe already exists, you can reuse it. – Gilles 'SO- stop being evil' Nov 07 '22 at 15:02