Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

#define SIGILL 6 /* blech */ -- Larry Wall in perl.c from the perl source code


devel / comp.graphics.apps.gnuplot / Re: command from inside gnuplot

SubjectAuthor
* command from inside gnuplotJörg Buchholz
+- Re: command from inside gnuplotChris Elvidge
`* Re: command from inside gnuplotHans-Bernhard Bröker
 `- Re: command from inside gnuplotJörg Buchholz

1
command from inside gnuplot

<uicvon$uk3l$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=166&group=comp.graphics.apps.gnuplot#166

  copy link   Newsgroups: comp.graphics.apps.gnuplot
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bookwood...@freenet.de (Jörg Buchholz)
Newsgroups: comp.graphics.apps.gnuplot
Subject: command from inside gnuplot
Date: Tue, 7 Nov 2023 10:24:38 +0100
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <uicvon$uk3l$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 7 Nov 2023 09:24:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="edbf46aefe41a627b35abc3c5e0bd7be";
logging-data="1003637"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/l/Lh+2+doppdPdxt8V1lDSCddwbmiEjg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:qR42kfB5Z04saBdT3V+AoxRKcTQ=
Content-Language: en-GB
 by: Jörg Buchholz - Tue, 7 Nov 2023 09:24 UTC

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"))

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

Re: command from inside gnuplot

<uid2ps$v585$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=167&group=comp.graphics.apps.gnuplot#167

  copy link   Newsgroups: comp.graphics.apps.gnuplot
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chr...@mshome.net (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: <uid2ps$v585$1@dont-email.me>
References: <uicvon$uk3l$1@dont-email.me>
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: <uicvon$uk3l$1@dont-email.me>
 by: Chris Elvidge - Tue, 7 Nov 2023 10:16 UTC

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

Re: command from inside gnuplot

<kqvbqhF5gsmU1@mid.dfncis.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=168&group=comp.graphics.apps.gnuplot#168

  copy link   Newsgroups: comp.graphics.apps.gnuplot
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail
From: HBBroe...@gmail.com (Hans-Bernhard Bröker)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: command from inside gnuplot
Date: Tue, 7 Nov 2023 18:52:17 +0100
Lines: 27
Message-ID: <kqvbqhF5gsmU1@mid.dfncis.de>
References: <uicvon$uk3l$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.dfncis.de iFAl+ANJ7vtIHjH4u8G7bggHhriO1vLvlqHOZxE+nzVJ5hacmOvPjy8hFa
Cancel-Lock: sha1:9+gQdf70XvoNbBsgVGYw3f78eyE= sha256:ymwrta2cFEIA1VSbENltdnhd8Yj9q+GB7XO5mnDCuiM=
User-Agent: Mozilla Thunderbird
Content-Language: de-DE, en-US
In-Reply-To: <uicvon$uk3l$1@dont-email.me>
 by: Hans-Bernhard Bröke - Tue, 7 Nov 2023 17:52 UTC

Am 07.11.2023 um 10:24 schrieb Jörg Buchholz:
> 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"))

Unfortunately this suffers from a lack of escaping. Please note that
"strings in double quotes" go through some pre-processing in gnuplot,
including backslash escape substitution done to them before being used.
So if you want literal backslashes, they have to be escaped. See "help
quote" for the details.

What that means is that

system "sed -i 's/^\\xef\\xbb\\xbf//' ./process-2023-11-02-13-04-40.csv"

should work better.

Re: command from inside gnuplot

<uif9o5$1fopo$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=169&group=comp.graphics.apps.gnuplot#169

  copy link   Newsgroups: comp.graphics.apps.gnuplot
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bookwood...@freenet.de (Jörg Buchholz)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: command from inside gnuplot
Date: Wed, 8 Nov 2023 07:27:16 +0100
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <uif9o5$1fopo$1@dont-email.me>
References: <uicvon$uk3l$1@dont-email.me> <kqvbqhF5gsmU1@mid.dfncis.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 8 Nov 2023 06:27:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e5daefa1c200da6fba3ca277d51e9afa";
logging-data="1565496"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+g7GlRIANFmZ5Qq76AVcNAvIAoO7ayk3Q="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:lK/daT9SbynTLgzCnTee+fYYgV0=
In-Reply-To: <kqvbqhF5gsmU1@mid.dfncis.de>
Content-Language: de-DE
 by: Jörg Buchholz - Wed, 8 Nov 2023 06:27 UTC

On 07.11.23 18:52, Hans-Bernhard Bröker wrote:
> Am 07.11.2023 um 10:24 schrieb Jörg Buchholz:
>> 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"))
>
> Unfortunately this suffers from a lack of escaping.  Please note that
> "strings in double quotes" go through some pre-processing in gnuplot,
> including backslash escape substitution done to them before being used.
> So if you want literal backslashes, they have to be escaped. See "help
> quote" for the details.
>
> What that means is that
>
> system "sed -i 's/^\\xef\\xbb\\xbf//' ./process-2023-11-02-13-04-40.csv"
>
> should work better.
>
That's it. Thanks a lot. I was nearby, but use the wrong slash to
escaped backslashes.

Jörg

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor