|
From: Ethan M. <merritt@u.washington.edu> - 2004-05-18 00:16:49
|
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? > 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? 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 -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |