in reply to Redirect file write from external program to STDOUT

We need a little more explanation, this question is sort of vague. If $script actually generates the JPEG binary code, then you could probably modify the script to write to STDOUT, although I don't really see the point.

However, it looks like you are using $program to do some processing. In that case, if $program is compiled, and actually writes the JPEG to a filehandle that you can't change then probably not.

I could be way off base here, but I would need a better explanation of what is going on to be sure.

Replies are listed 'Best First'.
Re: Re: Redirect file write from external program to STDOUT
by chunlou (Curate) on Jun 26, 2003 at 13:47 UTC
    Normally you would do:

    prompt> program.exe script.file

    And the program.exe writes a jpeg file. script.file contains the instruction. `echo $script | $program` is simply another way to do it without physically a script.file.

    Thanks.