Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #4550

Re: command from inside gnuplot

From Chris Elvidge <chris@mshome.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: command from inside gnuplot
Date 2023-11-07 10:16 +0000
Organization A noiseless patient Spider
Message-ID <uid2ps$v585$1@dont-email.me> (permalink)
References <uicvon$uk3l$1@dont-email.me>

Show all headers | View raw


On 07/11/2023 09:24, Jörg Buchholz wrote:
> Hi,
> 
> i have a problem to use a system command from inside gnuplot.
> 
> sed -i 's/^\xef\xbb\xbf//' ./process-2023-11-02-13-04-40.csv
> 
> works at the terminal
> 
> 
> system "sed -i 's/^\xef\xbb\xbf//' ./process-2023-11-02-13-04-40.csv"
> and
> system(sprintf("sed -i 's/^\xef\xbb\xbf//' 
> ./process-2023-11-02-13-04-40.csv"))

Shouldn't that be just:
system("sed -i 's/^\xef\xbb\xbf//' ./process-2023-11-02-13-04-40.csv")
After all, sprintf isn't a system command and you're not expecting any 
output.

> 
> in a gnuplot script do not work, but gnuplot shows me
> 
> GPVAL_SYSTEM_ERRNO = 0
> GPVAL_SYSTEM_ERRMSG = "Success"
> 
> 
> as a test I try
> 
> system "cp ./process-2023-11-02-13-04-40.csv 
> ./process-2023-11-02-13-04-40.test"
> 
> this works, the file process-2023-11-02-13-04-40.test was created.
> 
> 
> what's wrong?
> 
> Jörg



-- 
Chris Elvidge, England
RUDOLPH'S RED NOSE IS NOT ALCOHOL-RELATED

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

command from inside gnuplot Jörg Buchholz <bookwood4new@freenet.de> - 2023-11-07 10:24 +0100
  Re: command from inside gnuplot Chris Elvidge <chris@mshome.net> - 2023-11-07 10:16 +0000
  Re: command from inside gnuplot Hans-Bernhard Bröker <HBBroeker@gmail.com> - 2023-11-07 18:52 +0100
    Re: command from inside gnuplot Jörg Buchholz <bookwood4new@freenet.de> - 2023-11-08 07:27 +0100

csiph-web