From: Wesley M. <mo...@ch...> - 2004-05-18 00:55:04
|
On Mon, 17 May 2004, Ethan Merritt wrote: > On Monday 17 May 2004 04:58 pm, Wesley Morgan wrote: > > I'm simply thinking that I would like to be able to execute something > > like this... > > > > set dbserver 'localhost' > > set dbname 'test' > > set dbuser 'test' > > plot 'select * from table' with lines > > <ask for password if necessary> > > <plot away> > > I'm lost. What is this snippet supposed to represent? > Are these commands to gnuplot? Yes, exactly. > > As you see, I'm not looking for an interface TO gnuplot, the command > > line works quite well for me. I'm more curious as to how difficult it > > would be to add this functionality to gnuplot itself. It already > > supports a tremendous range of output formats, so why not accept a few > > more input methods? > > But isn't that just another pipe, or anyway a pair of pipes? > What is different about this input to gnuplot that distinguishes it > from any other input to gnuplot? Well by "input" I meant data not commands. > If I understand what you are trying to do, you should be able > to send your commands *to* the database with shell escapes > and read the output *from* the database via a pipe. > Something more or less like: > > gnuplot> ! mkfifo ./database_out > gnuplot> ! db 'select * from table' > ./database_out > gnuplot> plot '< ./database_out' with lines Yes, but isn't that much more complicated than simply gnuplot itself supporting a direct connection to the db? :> -- Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! |