Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

Stinginess with privileges is kindness in disguise. -- Guide to VAX/VMS Security, Sep. 1984


computers / comp.graphics.apps.gnuplot / Re: Filepath column data: basename

SubjectAuthor
* Filepath column data: basenameSarat Sreepathi
`* Re: Filepath column data: basenameKarl Ratzsch
 `- Re: Filepath column data: basenameChris Elvidge

1
Subject: Filepath column data: basename
From: Sarat Sreepathi
Newsgroups: comp.graphics.apps.gnuplot
Date: Sat, 21 Nov 2020 00:18 UTC
X-Received: by 2002:aed:39c2:: with SMTP id m60mr18083410qte.206.1605917890009;
Fri, 20 Nov 2020 16:18:10 -0800 (PST)
X-Received: by 2002:a25:d94:: with SMTP id 142mr25213116ybn.258.1605917889696;
Fri, 20 Nov 2020 16:18:09 -0800 (PST)
Path: i2pn2.org!i2pn.org!aioe.org!peer01.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.graphics.apps.gnuplot
Date: Fri, 20 Nov 2020 16:18:07 -0800 (PST)
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=163.116.146.119; posting-account=aqT8ZgoAAACNkwTgVzvzQbUmhfbE0vSs
NNTP-Posting-Host: 163.116.146.119
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2f8a72a5-b4c1-40d4-ae13-8634463cd5bcn@googlegroups.com>
Subject: Filepath column data: basename
From: sar...@ornl.gov (Sarat Sreepathi)
Injection-Date: Sat, 21 Nov 2020 00:18:09 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1288
X-Received-Body-CRC: 2463196998
View all headers
Hello:

I have a data file where one of the columns contains full path names. Is there a trick to getting a basename from that field? Any builtins for other transformations on that field?

Appreciate any pointers.
Thanks,
Sarat.


Subject: Re: Filepath column data: basename
From: Karl Ratzsch
Newsgroups: comp.graphics.apps.gnuplot
Organization: solani.org
Date: Sat, 21 Nov 2020 09:35 UTC
References: 1
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: mail....@gmx.net (Karl Ratzsch)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: Filepath column data: basename
Date: Sat, 21 Nov 2020 10:35:52 +0100
Organization: solani.org
Message-ID: <rpan1s$dgu$1@solani.org>
References: <2f8a72a5-b4c1-40d4-ae13-8634463cd5bcn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 21 Nov 2020 09:35:56 -0000 (UTC)
Injection-Info: solani.org;
logging-data="13854"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.4.3
In-Reply-To: <2f8a72a5-b4c1-40d4-ae13-8634463cd5bcn@googlegroups.com>
Cancel-Lock: sha1:xU3gmLdQwuNM5C74ZbJRNK4f1EU=
X-User-ID: eJwFwQkBwDAIA0BLfAkgp3TDv4Tewam8GQQDi2V9xpqMdqtIhxQscU+sKuefyUaX7HHx9X34jBAl
Content-Language: de-DE
View all headers
Am 21.11.2020 um 01:18 schrieb Sarat Sreepathi:
Hello:

I have a data file where one of the columns contains full path names. Is there a trick to getting a basename from that field? Any builtins for other transformations on that field?

Appreciate any pointers.
Thanks,
Sarat.


Recursion: ;)

basen(fullp) = (a = strstrt(fullp,'\'), a == 0 ? fullp : basen( substr(fullp,a+1,strlen(fullp) ) ) )

pr basen('helo')
pr basen('helo\halo')
pr basen('helo\halo\holo')

In the same way you can delete (possibly multiple) .extensions from the filename.


Subject: Re: Filepath column data: basename
From: Chris Elvidge
Newsgroups: comp.graphics.apps.gnuplot
Organization: A noiseless patient Spider
Date: Sat, 21 Nov 2020 10:50 UTC
References: 1 2
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: chr...@mshome.net (Chris Elvidge)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: Filepath column data: basename
Date: Sat, 21 Nov 2020 10:50:56 +0000
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <rparf2$cn3$1@dont-email.me>
References: <2f8a72a5-b4c1-40d4-ae13-8634463cd5bcn@googlegroups.com>
<rpan1s$dgu$1@solani.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 21 Nov 2020 10:51:14 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="1e51784f63afb862fc9099591cd1c26d";
logging-data="13027"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1913c4UI1KV4waU3Nakggp8P0R/SgZpTc0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
Cancel-Lock: sha1:23ZbSSuqZEZXYFRzrdcqgYpUCN8=
In-Reply-To: <rpan1s$dgu$1@solani.org>
Content-Language: en-GB
View all headers
On 21/11/2020 09:35 am, Karl Ratzsch wrote:
Am 21.11.2020 um 01:18 schrieb Sarat Sreepathi:
Hello:

I have a data file where one of the columns contains full path names. Is there a trick to getting a basename from that field? Any builtins for other transformations on that field?

Appreciate any pointers.
Thanks,
Sarat.


Recursion: ;)

basen(fullp) = (a = strstrt(fullp,'\'), a == 0 ? fullp : basen( substr(fullp,a+1,strlen(fullp) ) ) )

pr basen('helo')
pr basen('helo\halo')
pr basen('helo\halo\holo')

In the same way you can delete (possibly multiple) .extensions from the filename.

Can you use a function?
e.g. f=system("basename ".fullpath)



--

Chris Elvidge, England


1
rocksolid light 0.7.2
clearneti2ptor