I am using Cygwin - no, don't close yet - and I am having trouble with the
<() syntax. A program refuses to accept the file descriptor that I am passing it, but other programs will accept it fine. My hypothesis is that the program is passing the file descriptor to one of its helper programs, which then does not receive the pipe (just the usual
2, of which
2 are probably closed). This works fine with
cat, just not with this program.
./jpegtran -copy all -drop +16+16 <(echo "JPEG FILE") -outfile out.jpeg out.jpeg
This produces the error message:
C:\path\to\jpegtran.exe: can't open /dev/fd/63 for reading
Is there a way to do this? Or will I have to resort to... temporary files? *shudder*
As far as I know, Cygwin simulates a POSIX environment for all intents and purposes. If it can't create a pseudo-file using named pipes (something I know is possible using the Windows API under
//./pipe/pipename, which should be able to be handled using whatever name-rewriting is currently being used for when I pass a Windows program a
/cygdrive/c/ path) then I'm happy with answers that will work on an actual 'nix box.