|
From: Allin C. <cot...@wf...> - 2007-03-09 13:39:26
|
On Thu, 8 Mar 2007, Ethan A Merritt wrote: > On Thursday 08 March 2007 19:35, Allin Cottrell wrote: >>> bash-3.1$ echo "show term" | GNUTERM=dumb gnuplot_4.2 >>> >>> terminal type is dumb feed 79 24 >> >> Yes, that works fine, only you have to parse the response; the >> exit status seems to be OK regardless of the GNUTERM setting. > > Were you expecting an error exit status? Why? > > I would not have expected an error exit from your original > test run on gnuplot version 4.0 either. > Failing to find a terminal is not a fatal error. > It just returns you to the gnuplot command prompt. > So when would you ever see an error exit? I may have misdescribed the outcome, but in the context of a configure check this is what I had in mind: echo "set term png" | gnuplot 2>/dev/null && echo "OK" echo "set term foo" | gnuplot 2>/dev/null && echo "OK" The first command echoes "OK", the second doesn't. Thus I can get a reading on whether the term type is supported without having to parse any gnuplot output. Allin Cottrell |