Re: Pipe the content of a variable to a process [message #173042 is a reply to message #173037] |
Fri, 18 March 2011 17:08 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 3/18/2011 10:05 AM, Marco wrote:
> On 2011-03-18 Jerry Stuckle<jstucklex(at)attglobal(dot)net> wrote:
>
>> I understand that produces the correct output. But from what I read in
>> the doc, -e says to use stdin - which is what you're trying to use.
>> Without -e it goes to the command line, which you are not doing. So
>> it'd doing exactly what you tell it to do - nothing.
>
> That's incorrect. Without »-e« gnuplot reads from stdin, with »-e« from the
> command line. You can check this.
>
> gnuplot -e 'set terminal svg;plot sin(x)'
> echo 'set terminal svg;plot sin(x)' | gnuplot
>
> give both the same output.
>
>> I suggest you ask the gnuplot people. I don't think the problem is the
>> output stream is failing - I think your commands are incorrect.
>
> I know gnuplot pretty well. Without arguments it can be used directly in a
> pipe (with proper input on stdin, of course). It would be difficult to get
> help in the gnuplot group, since it works on the command line.
>
>
> Marco
>
OK, I read that backwards
But the pipes in PHP work fine - I've used them successfully before.
Is this binary data which is being passed back? Also, are you running
this as using CLI or is it part of a web page?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|