Path: csiph.com!news.mixmin.net!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Chris Elvidge Newsgroups: comp.graphics.apps.gnuplot Subject: Re: command from inside gnuplot Date: Tue, 7 Nov 2023 10:16:27 +0000 Organization: A noiseless patient Spider Lines: 44 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 7 Nov 2023 10:16:28 -0000 (UTC) Injection-Info: dont-email.me; posting-host="974896d0fe1f0651d1ab40e7e1cb20af"; logging-data="1021189"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/C/1gxBUKpwBoVZ2/ZqQ+us8rZ0VvHS34=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Lightning/5.4 Cancel-Lock: sha1:9SESNcjXiy2mbjM9d3x0zX2v12s= Content-Language: en-GB In-Reply-To: Xref: csiph.com comp.graphics.apps.gnuplot:4550 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