Consider a command like
foo -in /path/to/infile -out /path/to/outfile, that you'd like to pass strings to rather than using temp files. It may be called a lot causing much disk access, or is related to encryption where you don't want to write sensitive data to disk (or deal with encrypted and/or ram disks, etc).
Is there a way to give it stdin and get the output in stdout,
echo "abc" | foo -in &0 -out &1?
I know there are file descriptors you can redirect data to and from, like
echo "foo" 1>&2. And that things like
xargs can pass strings as arguments. But is it possible to pass a standard file descriptor as a file path in some way? If I can read and write to stdin/out as a file, why not be able to get its "virtual" file path?