Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"But what we need to know is, do people want nasally-insertable computers?"


devel / comp.unix.shell / finding directories based on files within?

SubjectAuthor
* finding directories based on files within?Eli the Bearded
+- Re: finding directories based on files within?Spiros Bousbouras
+- Re: finding directories based on files within?Martijn Dekker
+* Re: finding directories based on files within?Ed Morton
|`- Re: finding directories based on files within?Ed Morton
+* Re: finding directories based on files within?Axel Reichert
|`* Re: finding directories based on files within?Ed Morton
| `- Re: finding directories based on files within?Axel Reichert
`* Re: finding directories based on files within?Randal L. Schwartz
 +- Re: finding directories based on files within?Eli the Bearded
 `* Re: finding directories based on files within?Christian Weisgerber
  +- Re: finding directories based on files within?Randal L. Schwartz
  `* find2perl (Was: finding directories based on files within?)Kenny McCormack
   +- Re: find2perlDan Espen
   +* Re: find2perl (Was: finding directories based on files within?)Christian Weisgerber
   |`- Re: find2perl (Was: finding directories based on files within?)Kenny McCormack
   `- Re: find2perlRandal L. Schwartz

1
finding directories based on files within?

<eli$2105101745@qaz.wtf>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3759&group=comp.unix.shell#3759

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!paganini.bofh.team!goblin2!goblin3!goblin.stu.neva.ru!panix!qz!not-for-mail
From: *...@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.unix.shell
Subject: finding directories based on files within?
Date: Mon, 10 May 2021 22:13:50 +0000 (UTC)
Organization: Some absurd concept
Lines: 36
Message-ID: <eli$2105101745@qaz.wtf>
NNTP-Posting-Host: panix5.panix.com
X-Trace: reader1.panix.com 1620684830 13121 166.84.1.5 (10 May 2021 22:13:50 GMT)
X-Complaints-To: abuse@panix.com
NNTP-Posting-Date: Mon, 10 May 2021 22:13:50 +0000 (UTC)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
User-Agent: Vectrex rn 2.1 (beta)
 by: Eli the Bearded - Mon, 10 May 2021 22:13 UTC

I currently have a simple shell script along the lines of:

find "$1" -type d \
-exec test -f {}/SENTINEL-1 \; \
-exec test -f {}/SENTINEL-2 \; \
-print

The idea is to list directories that satisfy the condition of having two
exactly named files within them. This code works, but it's not exactly
fast (two execs for each matched directory), and it doesn't scale well:
three files or has one but NOT the other, has either one of them, has
sub-directories of particular names etc, all require rewriting the whole
command. The way I use this tool, it needs to examine both immediate
subdirectories of "$1" and one level further.

Before I write myself a custom tool, is there a better way of doing this
sort of thing? In my case, the directories are all small, with a median
of under ten items, so spped of readdir() versus stat() isn't a big
concern (and I'd be comparing the speed to find).

I already have a Perl script that might be a candidate for replacement
if there is a better way. That script does not need to recurse, so it
doesn't use find (or the Perl equivilent module). It takes a list of
directories and prints the ones that only have files matching a couple of
globs, specifically (case insenitive) *.txt and *.html. Any directory
that has a .jpg or other non-txt, non-html suffix, an or a file with no
suffix, is not printed.

For those wondering, the commonality is both of these uses are for
automatic clean-up of directories created by other programs. Directories
that match are safe to delete without further inspection (subject to
race conditions).

Elijah
------
has this set of data been processed? and backed up?

Re: finding directories based on files within?

<qMPRgfB8sGSKBlu44@bongo-ra.co>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3760&group=comp.unix.shell#3760

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc3.netnews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx17.ams4.POSTED!not-for-mail
From: spi...@gmail.com (Spiros Bousbouras)
Newsgroups: comp.unix.shell
Subject: Re: finding directories based on files within?
Message-ID: <qMPRgfB8sGSKBlu44@bongo-ra.co>
References: <eli$2105101745@qaz.wtf>
In-Reply-To: <eli$2105101745@qaz.wtf>
X-Organisation: Weyland-Yutani
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Lines: 28
X-Complaints-To: http://netreport.virginmedia.com
NNTP-Posting-Date: Thu, 13 May 2021 02:38:32 UTC
Organization: virginmedia.com
Date: Thu, 13 May 2021 02:38:32 GMT
X-Received-Bytes: 1795
 by: Spiros Bousbouras - Thu, 13 May 2021 02:38 UTC

On Mon, 10 May 2021 22:13:50 +0000 (UTC)
Eli the Bearded <*@eli.users.panix.com> wrote:
> I currently have a simple shell script along the lines of:
>
> find "$1" -type d \
> -exec test -f {}/SENTINEL-1 \; \
> -exec test -f {}/SENTINEL-2 \; \
> -print
>
> The idea is to list directories that satisfy the condition of having two
> exactly named files within them. This code works, but it's not exactly
> fast (two execs for each matched directory), and it doesn't scale well:
> three files or has one but NOT the other, has either one of them, has
> sub-directories of particular names etc, all require rewriting the whole
> command.

Perhaps

find "$1" -type d -printf '[ -f %p/SENTINEL-1 -a -f %p/SENTINEL-2 ] && echo %p\n' | sh

You would need to do minimal rewriting for the other uses you mention. But
it won't work if the file names may contain characters which are special
to the shell.

> The way I use this tool, it needs to examine both immediate
> subdirectories of "$1" and one level further.

I would need to see an example to be clear what this means.

Re: finding directories based on files within?

<ig3igiF70kpU1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3761&group=comp.unix.shell#3761

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: mart...@inlv.demon.nl (Martijn Dekker)
Newsgroups: comp.unix.shell
Subject: Re: finding directories based on files within?
Date: Thu, 13 May 2021 04:50:57 +0200
Lines: 114
Message-ID: <ig3igiF70kpU1@mid.individual.net>
References: <eli$2105101745@qaz.wtf>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net CvDLsZvGuTomese0Iw+SZAKuUIoTpO29lwbEEix1uEAkvAeQs=
Cancel-Lock: sha1:gxYsWDfMh4DFxO4pDltx6iScqY0=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.10.1
In-Reply-To: <eli$2105101745@qaz.wtf>
Content-Language: en-GB
 by: Martijn Dekker - Thu, 13 May 2021 02:50 UTC

Op 10-05-21 om 23:13 schreef Eli the Bearded:
> I currently have a simple shell script along the lines of:
>
> find "$1" -type d \
> -exec test -f {}/SENTINEL-1 \; \
> -exec test -f {}/SENTINEL-2 \; \
> -print
>
> The idea is to list directories that satisfy the condition of having two
> exactly named files within them. This code works, but it's not exactly
> fast (two execs for each matched directory), and it doesn't scale well:

To do that sort of thing well with the standard shell and utilities,
your only recourse is to make 'find' invoke another shell that does the
work in a separate script. That script could be in a file or passed to
the shell via the -c option, as below.

find "$1" -type d -exec sh -c '
for dir do
if test -f "$dir/SENTINEL-1" \
&& test -f "$dir/SENTINEL-2"
then
printf %s\\n "$dir"
fi
done
' dummy {} +

The {} + (instead of {} \;) saves up all the arguments and passes as
many of them as possible to the sh invocation. This feature is in POSIX
and is widespread now (although still unfortunately quite broken in
BusyBox 'find').

The above should work for your stated purpose, but if you want to do
anything more complicated, you're quickly going to run into limitations.
For instance, you can't set any variables in the child shell and expect
to use them outside of it, nor can the separate script use any of your
shell functions.

These limitations are why I integrated the 'find' utility into the shell
as one of the modular loop constructs in my shell library, modernish,
which runs on nearly every POSIX shell and OS (see my .sig for the
link). As far as I know, this is a unique feature that does not exist
anywhere else. In modernish, you can do:

.. modernish
use var/loop/find
found=0
LOOP find dir in "$1" -type d
DO
if test -f "$dir/SENTINEL-1" \
&& test -f "$dir/SENTINEL-2"
then
printf 'Found: %s\n' "$dir"
found=$((found+1))
fi
DONE
printf 'Found %d matching directories\n' "$found"

The loop construct invokes 'find' in the background and feeds the
results into the shell in the specified variable (in this case, dir).
This gives you robust processing for free; even newlines in file names
are no problem (provided you quote your variables).

The counter in the example is just to demonstrate that variables survive
the loop as you would expect. The loop body runs in the main shell
environment and can do anything you want without limitations. Internally
it's just a 'while read && eval; do ... done' loop, connected to a file
descriptor that maintains a pipe to the 'find' utility. So things like
'continue' and 'break' also work as expected; the pipe is automatically
broken if the loop is exited for any reason, terminating the 'find'
background process. If you're curious about how it works, just look at
the library code -- it's well commented.

If you'll indulge me a little more, below is functionally identical
example that uses a few more shell language modernisation features in
modernish (see notes below):

.. modernish
use safe # remove most quoting headaches
use var/loop/find
dirsfound=0
LOOP find dir in $1 -type d
DO
if is present $dir/SENTINEL-1 \
&& is present $dir/SENTINEL-2
then
putln "Found: $dir"
let dirsfound+=1
fi
DONE
putln "Found $dirsfound directories matching criteria"

Notes:
- The safe mode turns off global split/glob to remove most quoting
headaches. With split and glob gone, only empty removal (meaning: an
unquoted empty variable is removed and will not become an empty
argument) remains as a potential issue.
- The is() function is part of a more readable alternative to the
horrible 'test' botch of a command that, unlike 'test', deals correctly
with empty removal. Use 'is present' to see if there's anything there,
'is reg' to test for a regular file, 'is -L reg' to test for a regular
file or symlink to a regular file.
- putln() avoids echo's portability pitfalls without needing to resort
to printf. Each argument is printed on a separate line. There's also
put() which prints space-separated arguments without a newline.
- the 'let' arithmetic command is provided as a shell function on any
shell that doesn't have a bash/ksh/zsh-style 'let' command built in.

--
|| modernish -- harness the shell
|| https://github.com/modernish/modernish
||
|| KornShell lives!
|| https://github.com/ksh93/ksh

Re: finding directories based on files within?

<s7j5i6$7up$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3764&group=comp.unix.shell#3764

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: mortons...@gmail.com (Ed Morton)
Newsgroups: comp.unix.shell
Subject: Re: finding directories based on files within?
Date: Thu, 13 May 2021 07:20:21 -0500
Organization: A noiseless patient Spider
Lines: 68
Message-ID: <s7j5i6$7up$1@dont-email.me>
References: <eli$2105101745@qaz.wtf>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 13 May 2021 12:20:22 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="81ea973e494f3bc40b9c69aabe87fb07";
logging-data="8153"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sUqSVPJR+wQJAxmQRfZWs"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.10.1
Cancel-Lock: sha1:lX6B8FHv+Ldac+wqf9xtrUNAu7s=
In-Reply-To: <eli$2105101745@qaz.wtf>
X-Antivirus-Status: Clean
Content-Language: en-US
X-Antivirus: Avast (VPS 210513-0, 05/12/2021), Outbound message
 by: Ed Morton - Thu, 13 May 2021 12:20 UTC

On 5/10/2021 5:13 PM, Eli the Bearded wrote:
> I currently have a simple shell script along the lines of:
>
> find "$1" -type d \
> -exec test -f {}/SENTINEL-1 \; \
> -exec test -f {}/SENTINEL-2 \; \
> -print
>
> The idea is to list directories that satisfy the condition of having two
> exactly named files within them.

FWIW I'd just do something like (untested):

find "$1" -type f |
awk -F'/' '
{ dir=$(NF-1) }
dir != prev { prt(); prev=dir}
{ files[$NF] }
END { prt() }
function prt() {
if ( ("SENTINEL-1" in files) && ("SENTINEL-2" in files) ) {
print prev
}
delete files
}
'

so the `find` just prints a list of paths to files, awk is only called
once and will be extremely efficient so it scales well, it's only using
mandatory POSIX tools so it'll work on any Unix box, and you can
trivially write whatever condition you like in the `prt()` function or
write a generalized prt() function such that you can pass a variable to
specify different types of comparison and/or a list of files to test for.

Regards

Ed.

This code works, but it's not exactly
> fast (two execs for each matched directory), and it doesn't scale well:
> three files ;or has one but NOT the other, has either one of them, has
> sub-directories of particular names etc, all require rewriting the whole
> command. The way I use this tool, it needs to examine both immediate
> subdirectories of "$1" and one level further.
>
> Before I write myself a custom tool, is there a better way of doing this
> sort of thing? In my case, the directories are all small, with a median
> of under ten items, so spped of readdir() versus stat() isn't a big
> concern (and I'd be comparing the speed to find).
>
> I already have a Perl script that might be a candidate for replacement
> if there is a better way. That script does not need to recurse, so it
> doesn't use find (or the Perl equivilent module). It takes a list of
> directories and prints the ones that only have files matching a couple of
> globs, specifically (case insenitive) *.txt and *.html. Any directory
> that has a .jpg or other non-txt, non-html suffix, an or a file with no
> suffix, is not printed.
>
> For those wondering, the commonality is both of these uses are for
> automatic clean-up of directories created by other programs. Directories
> that match are safe to delete without further inspection (subject to
> race conditions).
>
> Elijah
> ------
> has this set of data been processed? and backed up?
>

Re: finding directories based on files within?

<m2mtsybxmc.fsf@axel-reichert.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3765&group=comp.unix.shell#3765

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: mai...@axel-reichert.de (Axel Reichert)
Newsgroups: comp.unix.shell
Subject: Re: finding directories based on files within?
Date: Thu, 13 May 2021 14:56:43 +0200
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <m2mtsybxmc.fsf@axel-reichert.de>
References: <eli$2105101745@qaz.wtf>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="3c51bcb2fcbb2ebbcba492720cf2f10d";
logging-data="18123"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Zj7e3nB8h/Zh4S14fzUdC3JdEmmkSeJk="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin)
Cancel-Lock: sha1:qCggIS53qGH7E1KviiprYcKy2sI=
sha1:X6yBOQIsg73a/Lc2lyUq7rr40j8=
 by: Axel Reichert - Thu, 13 May 2021 12:56 UTC

Eli the Bearded <*@eli.users.panix.com> writes:

> find "$1" -type d \
> -exec test -f {}/SENTINEL-1 \; \
> -exec test -f {}/SENTINEL-2 \; \
> -print

What about

find "$1" -type f -maxdepth 2 \
| sed -n '/\/SENTINEL-[12]$/s/\/SENTINEL-[12]$//p' \
| uniq -c \
| awk '$1 == 2 {print $2}'

?

Best regards

Axel

Re: finding directories based on files within?

<s7jafg$8t1$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3767&group=comp.unix.shell#3767

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: mortons...@gmail.com (Ed Morton)
Newsgroups: comp.unix.shell
Subject: Re: finding directories based on files within?
Date: Thu, 13 May 2021 08:44:15 -0500
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <s7jafg$8t1$1@dont-email.me>
References: <eli$2105101745@qaz.wtf> <m2mtsybxmc.fsf@axel-reichert.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 13 May 2021 13:44:16 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="81ea973e494f3bc40b9c69aabe87fb07";
logging-data="9121"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+AhlUjALK2GSa8C8uHGTNS"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.10.1
Cancel-Lock: sha1:1v1wB2Rpm2jAYz6+UL6PjHBkYbA=
In-Reply-To: <m2mtsybxmc.fsf@axel-reichert.de>
X-Antivirus-Status: Clean
Content-Language: en-US
X-Antivirus: Avast (VPS 210513-0, 05/12/2021), Outbound message
 by: Ed Morton - Thu, 13 May 2021 13:44 UTC

On 5/13/2021 7:56 AM, Axel Reichert wrote:
> Eli the Bearded <*@eli.users.panix.com> writes:
>
>> find "$1" -type d \
>> -exec test -f {}/SENTINEL-1 \; \
>> -exec test -f {}/SENTINEL-2 \; \
>> -print
>
> What about
>
> find "$1" -type f -maxdepth 2 \
> | sed -n '/\/SENTINEL-[12]$/s/\/SENTINEL-[12]$//p' \

You don't need to match the regexp twice, that sed command can be
written as just:

sed -n 's/\/SENTINEL-[12]$//p'

You'd obviously have to be careful if your file names contained regexp
metachars or, with the awk below, if your directory names contained any
spaces.

Ed.

> | uniq -c \
> | awk '$1 == 2 {print $2}'
>
> ?
>
> Best regards
>
> Axel
>

Re: finding directories based on files within?

<s7jbkk$rqm$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3768&group=comp.unix.shell#3768

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: mortons...@gmail.com (Ed Morton)
Newsgroups: comp.unix.shell
Subject: Re: finding directories based on files within?
Date: Thu, 13 May 2021 09:04:04 -0500
Organization: A noiseless patient Spider
Lines: 78
Message-ID: <s7jbkk$rqm$1@dont-email.me>
References: <eli$2105101745@qaz.wtf> <s7j5i6$7up$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 13 May 2021 14:04:04 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="81ea973e494f3bc40b9c69aabe87fb07";
logging-data="28502"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+QSv1pTfjK/dqNL2iYU9ja"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.10.1
Cancel-Lock: sha1:uzsIztv5nF+AdS/5tREYfZi5/OE=
In-Reply-To: <s7j5i6$7up$1@dont-email.me>
X-Antivirus-Status: Clean
Content-Language: en-US
X-Antivirus: Avast (VPS 210513-0, 05/12/2021), Outbound message
 by: Ed Morton - Thu, 13 May 2021 14:04 UTC

On 5/13/2021 7:20 AM, Ed Morton wrote:
> On 5/10/2021 5:13 PM, Eli the Bearded wrote:
>> I currently have a simple shell script along the lines of:
>>
>>     find "$1" -type d \
>>         -exec test -f {}/SENTINEL-1 \; \
>>         -exec test -f {}/SENTINEL-2 \; \
>>         -print
>>
>> The idea is to list directories that satisfy the condition of having two
>> exactly named files within them.
>
> FWIW I'd just do something like (untested):
>
> find "$1" -type f |
> awk -F'/' '

In the unlikely event that your file/directory names can contain
newlines then you'd use GNU find with `-print0` and GNU awk with
`BEGIN{RS=ORS="\0"}` to use nul-terminated instead of newline-terminated
paths.

Ed.

>     { dir=$(NF-1) }
>     dir != prev { prt(); prev=dir}
>     { files[$NF] }
>     END { prt() }
>     function prt() {
>         if ( ("SENTINEL-1" in files) && ("SENTINEL-2" in files) ) {
>             print prev
>         }
>         delete files
>     }
> '
>
> so the `find` just prints a list of paths to files, awk is only called
> once and will be extremely efficient so it scales well, it's only using
> mandatory POSIX tools so it'll work on any Unix box, and you can
> trivially write whatever condition you like in the `prt()` function or
> write a generalized prt() function such that you can pass a variable to
> specify different types of comparison and/or a list of files to test for.
>
> Regards
>
>     Ed.
>
>  This code works, but it's not exactly
>> fast (two execs for each matched directory), and it doesn't scale well:
>> three files ;or has one but NOT the other, has either one of them, has
>> sub-directories of particular names etc, all require rewriting the whole
>> command. The way I use this tool, it needs to examine both immediate
>> subdirectories of "$1" and one level further.
>>
>> Before I write myself a custom tool, is there a better way of doing this
>> sort of thing? In my case, the directories are all small, with a median
>> of under ten items, so spped of readdir() versus stat() isn't a big
>> concern (and I'd be comparing the speed to find).
>>
>> I already have a Perl script that might be a candidate for replacement
>> if there is a better way. That script does not need to recurse, so it
>> doesn't use find (or the Perl equivilent module). It takes a list of
>> directories and prints the ones that only have files matching a couple of
>> globs, specifically (case insenitive) *.txt and *.html. Any directory
>> that has a .jpg or other non-txt, non-html suffix, an or a file with no
>> suffix, is not printed.
>>
>> For those wondering, the commonality is both of these uses are for
>> automatic clean-up of directories created by other programs. Directories
>> that match are safe to delete without further inspection (subject to
>> race conditions).
>>
>> Elijah
>> ------
>> has this set of data been processed? and backed up?
>>
>

Re: finding directories based on files within?

<86zgwy66yu.fsf@red.stonehenge.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3769&group=comp.unix.shell#3769

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!usenet.goja.nl.eu.org!2.eu.feeder.erje.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc3.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx02.iad.POSTED!not-for-mail
From: mer...@stonehenge.com (Randal L. Schwartz)
Newsgroups: comp.unix.shell
Subject: Re: finding directories based on files within?
References: <eli$2105101745@qaz.wtf>
x-mayan-date: Long count = 13.0.8.9.5; tzolkin = 1 Chicchan; haab = 3 Zip
Message-ID: <86zgwy66yu.fsf@red.stonehenge.com>
Organization: Stonehenge Consulting Services; Portland, Oregon, USA
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix)
Cancel-Lock: sha1:ZZIOyeWXSR1JObHqm8aHhVe1XaQ=
MIME-Version: 1.0
Content-Type: text/plain
Lines: 22
X-Complaints-To: abuse@blocknews.net
NNTP-Posting-Date: Thu, 13 May 2021 14:43:05 UTC
Date: Thu, 13 May 2021 07:31:21 -0700
X-Received-Bytes: 1637
 by: Randal L. Schwartz - Thu, 13 May 2021 14:31 UTC

>>>>> "EtB" == Eli the Bearded <*@eli.users.panix.com> writes:

EtB> I currently have a simple shell script along the lines of:
EtB> find "$1" -type d \
EtB> -exec test -f {}/SENTINEL-1 \; \
EtB> -exec test -f {}/SENTINEL-2 \; \
EtB> -print

Eli! Have you forgotten your Perl?

find2perl "$1" -type -d \
-eval '-f "SENTINEL-1" and -f "SENTINEL-2"' -print | perl

Done. And if you cache the program, it's just one Perl process. :)

print "Just another Perl hacker,"; # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Dart/Flutter consulting, Technical writing, Comedy, etc. etc.
Still trying to think of something clever for the fourth line of this .sig

Re: finding directories based on files within?

<eli$2105131311@qaz.wtf>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3772&group=comp.unix.shell#3772

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!news.nntp4.net!news.gegeweb.eu!gegeweb.org!goblin3!goblin.stu.neva.ru!panix!qz!not-for-mail
From: *...@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.unix.shell
Subject: Re: finding directories based on files within?
Date: Thu, 13 May 2021 17:11:43 +0000 (UTC)
Organization: Some absurd concept
Lines: 25
Message-ID: <eli$2105131311@qaz.wtf>
References: <eli$2105101745@qaz.wtf> <86zgwy66yu.fsf@red.stonehenge.com>
NNTP-Posting-Host: panix5.panix.com
X-Trace: reader1.panix.com 1620925903 15277 166.84.1.5 (13 May 2021 17:11:43 GMT)
X-Complaints-To: abuse@panix.com
NNTP-Posting-Date: Thu, 13 May 2021 17:11:43 +0000 (UTC)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
User-Agent: Vectrex rn 2.1 (beta)
 by: Eli the Bearded - Thu, 13 May 2021 17:11 UTC

In comp.unix.shell, Randal L. Schwartz <merlyn@stonehenge.com> wrote:
> >>>>> "EtB" == Eli the Bearded <*@eli.users.panix.com> writes:
> EtB> I currently have a simple shell script along the lines of:
> EtB> find "$1" -type d \
> EtB> -exec test -f {}/SENTINEL-1 \; \
> EtB> -exec test -f {}/SENTINEL-2 \; \
> EtB> -print
>
> Eli! Have you forgotten your Perl?

No, I "use File::Find" for other finding needs.

> find2perl "$1" -type -d \
> -eval '-f "SENTINEL-1" and -f "SENTINEL-2"' -print | perl

But I have forgotten "find2perl". That looks a lot better for "one"
liners.

> Done. And if you cache the program, it's just one Perl process. :)

I expect I will do that.

Elijah
------
likes this suggestion

Re: finding directories based on files within?

<m2r1ia5u2t.fsf@axel-reichert.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3775&group=comp.unix.shell#3775

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: mai...@axel-reichert.de (Axel Reichert)
Newsgroups: comp.unix.shell
Subject: Re: finding directories based on files within?
Date: Thu, 13 May 2021 21:09:46 +0200
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <m2r1ia5u2t.fsf@axel-reichert.de>
References: <eli$2105101745@qaz.wtf> <m2mtsybxmc.fsf@axel-reichert.de>
<s7jafg$8t1$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="3c51bcb2fcbb2ebbcba492720cf2f10d";
logging-data="23838"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19cje0J1xbIzp60OYfE32U+YXwCWFKjrME="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin)
Cancel-Lock: sha1:4qhWzAjSSNuNSZwXdzlkRyqMyeU=
sha1:Y5pWIcO32++NPEPPdEq0T+51VmQ=
 by: Axel Reichert - Thu, 13 May 2021 19:09 UTC

Ed Morton <mortonspam@gmail.com> writes:

> On 5/13/2021 7:56 AM, Axel Reichert wrote:
>>
>> find "$1" -type f -maxdepth 2 \
>> | sed -n '/\/SENTINEL-[12]$/s/\/SENTINEL-[12]$//p' \
>
> You don't need to match the regexp twice, that sed command can be
> written as just:
>
> sed -n 's/\/SENTINEL-[12]$//p'

My bad, thanks for pointing this out. This redundancy crept in while
playing around with various approaches.

> You'd obviously have to be careful if your file names contained regexp
> metachars or, with the awk below, if your directory names contained
> any spaces.

Yep, that's clear.

Axel

Re: finding directories based on files within?

<slrns9r8ip.2c69.naddy@lorvorc.mips.inka.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3776&group=comp.unix.shell#3776

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!news.swapon.de!news.mixmin.net!weretis.net!feeder8.news.weretis.net!news.szaf.org!inka.de!mips.inka.de!.POSTED.localhost!not-for-mail
From: nad...@mips.inka.de (Christian Weisgerber)
Newsgroups: comp.unix.shell
Subject: Re: finding directories based on files within?
Date: Thu, 13 May 2021 22:04:09 -0000 (UTC)
Message-ID: <slrns9r8ip.2c69.naddy@lorvorc.mips.inka.de>
References: <eli$2105101745@qaz.wtf> <86zgwy66yu.fsf@red.stonehenge.com>
Injection-Date: Thu, 13 May 2021 22:04:09 -0000 (UTC)
Injection-Info: lorvorc.mips.inka.de; posting-host="localhost:::1";
logging-data="78026"; mail-complaints-to="usenet@mips.inka.de"
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Christian Weisgerber - Thu, 13 May 2021 22:04 UTC

On 2021-05-13, Randal L. Schwartz <merlyn@stonehenge.com> wrote:

> Eli! Have you forgotten your Perl?
>
> find2perl "$1" -type -d \
> -eval '-f "SENTINEL-1" and -f "SENTINEL-2"' -print | perl

find2perl is actually no longer part of perl.
You have to get it from CPAN (App-find2perl).

--
Christian "naddy" Weisgerber naddy@mips.inka.de

Re: finding directories based on files within?

<86sg2o5cvi.fsf@red.stonehenge.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3782&group=comp.unix.shell#3782

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!npeer.as286.net!npeer-ng0.as286.net!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx22.iad.POSTED!not-for-mail
From: mer...@stonehenge.com (Randal L. Schwartz)
Newsgroups: comp.unix.shell
Subject: Re: finding directories based on files within?
References: <eli$2105101745@qaz.wtf> <86zgwy66yu.fsf@red.stonehenge.com>
<slrns9r8ip.2c69.naddy@lorvorc.mips.inka.de>
x-mayan-date: Long count = 13.0.8.9.7; tzolkin = 3 Manik; haab = 5 Zip
Message-ID: <86sg2o5cvi.fsf@red.stonehenge.com>
Organization: Stonehenge Consulting Services; Portland, Oregon, USA
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix)
Cancel-Lock: sha1:xEPHcIKfzK/FXFIh9zCgfVXPevA=
MIME-Version: 1.0
Content-Type: text/plain
Lines: 14
X-Complaints-To: abuse@blocknews.net
NNTP-Posting-Date: Sat, 15 May 2021 14:03:05 UTC
Date: Sat, 15 May 2021 06:45:53 -0700
X-Received-Bytes: 1520
 by: Randal L. Schwartz - Sat, 15 May 2021 13:45 UTC

>>>>> "Christian" == Christian Weisgerber <naddy@mips.inka.de> writes:

Christian> find2perl is actually no longer part of perl.
Christian> You have to get it from CPAN (App-find2perl).

Nooooooo! First CGI.pm, and now this? Who's in charge here? :)

print "Just another Perl hacker,"; # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Dart/Flutter consulting, Technical writing, Comedy, etc. etc.
Still trying to think of something clever for the fourth line of this .sig

find2perl (Was: finding directories based on files within?)

<s7p0j3$t1kh$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3783&group=comp.unix.shell#3783

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.shell
Subject: find2perl (Was: finding directories based on files within?)
Date: Sat, 15 May 2021 17:32:19 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <s7p0j3$t1kh$1@news.xmission.com>
References: <eli$2105101745@qaz.wtf> <86zgwy66yu.fsf@red.stonehenge.com> <slrns9r8ip.2c69.naddy@lorvorc.mips.inka.de>
Injection-Date: Sat, 15 May 2021 17:32:19 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="951953"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Sat, 15 May 2021 17:32 UTC

In article <slrns9r8ip.2c69.naddy@lorvorc.mips.inka.de>,
Christian Weisgerber <naddy@mips.inka.de> wrote:
>On 2021-05-13, Randal L. Schwartz <merlyn@stonehenge.com> wrote:
>
>> Eli! Have you forgotten your Perl?
>>
>> find2perl "$1" -type -d \
>> -eval '-f "SENTINEL-1" and -f "SENTINEL-2"' -print | perl
>
>find2perl is actually no longer part of perl.
>You have to get it from CPAN (App-find2perl).

Indeed. I just tried running it - and, when that failed - trying to
install it - on a current Debian-ish system, and found that both failed -
i.e., it is no longer installed by default and it is no longer in the repos.

So, for the benefit of those of us who know next-to-nothing about Perl (and
prefer to remain that way), how (in simplest terms) do I go about
installing find2perl on this particular system?

Also, any idea why it was taken out (why it is no longer part of Perl) ?

--
"Women should not be enlightened or educated in any way. They should be
segregated because they are the cause of unholy erections in holy men.

-- Saint Augustine (354-430) --

Re: find2perl

<s7p1d5$vfb$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3784&group=comp.unix.shell#3784

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dan1es...@gmail.com (Dan Espen)
Newsgroups: comp.unix.shell
Subject: Re: find2perl
Date: Sat, 15 May 2021 13:46:12 -0400
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <s7p1d5$vfb$1@dont-email.me>
References: <eli$2105101745@qaz.wtf> <86zgwy66yu.fsf@red.stonehenge.com>
<slrns9r8ip.2c69.naddy@lorvorc.mips.inka.de>
<s7p0j3$t1kh$1@news.xmission.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="8c76298ddf337de8318f856f2b17c687";
logging-data="32235"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xAQm59UCXlpQ8hpMJJsVLifG7HkplpcA="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:xgYwtkiF5KxOv+Vc12srGCoci70=
 by: Dan Espen - Sat, 15 May 2021 17:46 UTC

gazelle@shell.xmission.com (Kenny McCormack) writes:

> In article <slrns9r8ip.2c69.naddy@lorvorc.mips.inka.de>,
> Christian Weisgerber <naddy@mips.inka.de> wrote:
>>On 2021-05-13, Randal L. Schwartz <merlyn@stonehenge.com> wrote:
>>
>>> Eli! Have you forgotten your Perl?
>>>
>>> find2perl "$1" -type -d \
>>> -eval '-f "SENTINEL-1" and -f "SENTINEL-2"' -print | perl
>>
>>find2perl is actually no longer part of perl.
>>You have to get it from CPAN (App-find2perl).
>
> Indeed. I just tried running it - and, when that failed - trying to
> install it - on a current Debian-ish system, and found that both failed -
> i.e., it is no longer installed by default and it is no longer in the repos.
>
> So, for the benefit of those of us who know next-to-nothing about Perl (and
> prefer to remain that way), how (in simplest terms) do I go about
> installing find2perl on this particular system?
>
> Also, any idea why it was taken out (why it is no longer part of Perl) ?

Fedora here.

dnf install perl-App-find2perl

Fed it a find command, it generated Perl.

--
Dan Espen

Re: find2perl (Was: finding directories based on files within?)

<slrnsa0b2l.16m8.naddy@lorvorc.mips.inka.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3786&group=comp.unix.shell#3786

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!inka.de!mips.inka.de!.POSTED.localhost!not-for-mail
From: nad...@mips.inka.de (Christian Weisgerber)
Newsgroups: comp.unix.shell
Subject: Re: find2perl (Was: finding directories based on files within?)
Date: Sat, 15 May 2021 20:17:25 -0000 (UTC)
Message-ID: <slrnsa0b2l.16m8.naddy@lorvorc.mips.inka.de>
References: <eli$2105101745@qaz.wtf> <86zgwy66yu.fsf@red.stonehenge.com>
<slrns9r8ip.2c69.naddy@lorvorc.mips.inka.de>
<s7p0j3$t1kh$1@news.xmission.com>
Injection-Date: Sat, 15 May 2021 20:17:25 -0000 (UTC)
Injection-Info: lorvorc.mips.inka.de; posting-host="localhost:::1";
logging-data="39625"; mail-complaints-to="usenet@mips.inka.de"
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Christian Weisgerber - Sat, 15 May 2021 20:17 UTC

On 2021-05-15, Kenny McCormack <gazelle@shell.xmission.com> wrote:

>>find2perl is actually no longer part of perl.
>
> So, for the benefit of those of us who know next-to-nothing about Perl (and
> prefer to remain that way), how (in simplest terms) do I go about
> installing find2perl on this particular system?

dh-make-perl --build --cpan App::find2perl
sudo dpkg -i *find2perl*.deb

Or so says
https://wiki.debian.org/PerlFAQ

> Also, any idea why it was taken out (why it is no longer part of Perl) ?

The s2p (sed-to-perl) and a2p (awk-to-perl) translators were removed
because they were ancient cruft that had outlived its usefulness,
and find2perl was in the same bathtub^Wdirectory.
https://groups.google.com/g/perl.perl5.porters/c/3RBKnlPaSmA

--
Christian "naddy" Weisgerber naddy@mips.inka.de

Re: find2perl

<86k0nz62z4.fsf@red.stonehenge.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3787&group=comp.unix.shell#3787

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!fdc3.netnews.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx40.iad.POSTED!not-for-mail
From: mer...@stonehenge.com (Randal L. Schwartz)
Newsgroups: comp.unix.shell
Subject: Re: find2perl
References: <eli$2105101745@qaz.wtf> <86zgwy66yu.fsf@red.stonehenge.com>
<slrns9r8ip.2c69.naddy@lorvorc.mips.inka.de>
<s7p0j3$t1kh$1@news.xmission.com>
x-mayan-date: Long count = 13.0.8.9.7; tzolkin = 3 Manik; haab = 5 Zip
Message-ID: <86k0nz62z4.fsf@red.stonehenge.com>
Organization: Stonehenge Consulting Services; Portland, Oregon, USA
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix)
Cancel-Lock: sha1:cdiu4K7n+W3ofcgfxd9KDRjNZlE=
MIME-Version: 1.0
Content-Type: text/plain
Lines: 49
X-Complaints-To: abuse@blocknews.net
NNTP-Posting-Date: Sat, 15 May 2021 22:43:06 UTC
Date: Sat, 15 May 2021 15:34:23 -0700
X-Received-Bytes: 2511
 by: Randal L. Schwartz - Sat, 15 May 2021 22:34 UTC

>>>>> "Kenny" == Kenny McCormack <gazelle@shell.xmission.com> writes:

Kenny> So, for the benefit of those of us who know next-to-nothing about Perl (and
Kenny> prefer to remain that way), how (in simplest terms) do I go about
Kenny> installing find2perl on this particular system?

Kenny> Also, any idea why it was taken out (why it is no longer part of
Kenny> Perl) ?

There's also my File::Finder in the CPAN which can build the equivalent
of nearly any find(1) expression using method chaining.

In this case, it'd be:

use File::Finder;

File::Finder
->type('d')
->eval('-f "SENTINEL-1" and -f "SENTINEL-2"')
->print
->in(@ARGV);

Or instead of printing them, you can gather them as an array:

use File::Finder;

my @list = File::Finder
->type('d')
->eval('-f "SENTINEL-1" and -f "SENTINEL-2"')
->in(@ARGV);

File::Finder was fun to write. And I essentially used a FORTH-like
"builds...does" strategy for the method chaining. And the expression
evaluator supports and/or/not/parens. So for something in find(1) like:

-condition -and -not \( -this -or -that \)

you could write it as:

condition->and->not->left->this->or->that->right

print "Just another Perl hacker,"; # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Dart/Flutter consulting, Technical writing, Comedy, etc. etc.
Still trying to think of something clever for the fourth line of this .sig

Re: find2perl (Was: finding directories based on files within?)

<s7r5d2$u4fp$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=3788&group=comp.unix.shell#3788

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.shell
Subject: Re: find2perl (Was: finding directories based on files within?)
Date: Sun, 16 May 2021 13:06:42 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <s7r5d2$u4fp$1@news.xmission.com>
References: <eli$2105101745@qaz.wtf> <slrns9r8ip.2c69.naddy@lorvorc.mips.inka.de> <s7p0j3$t1kh$1@news.xmission.com> <slrnsa0b2l.16m8.naddy@lorvorc.mips.inka.de>
Injection-Date: Sun, 16 May 2021 13:06:42 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="987641"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Sun, 16 May 2021 13:06 UTC

In article <slrnsa0b2l.16m8.naddy@lorvorc.mips.inka.de>,
Christian Weisgerber <naddy@mips.inka.de> wrote:
>On 2021-05-15, Kenny McCormack <gazelle@shell.xmission.com> wrote:
>
>>>find2perl is actually no longer part of perl.
>>
>> So, for the benefit of those of us who know next-to-nothing about Perl (and
>> prefer to remain that way), how (in simplest terms) do I go about
>> installing find2perl on this particular system?
>
>dh-make-perl --build --cpan App::find2perl

Interesting. Alas, it didn't work.

First, I had to "apt install dh-make-perl". That installed a crapload of
packages. And when I say crapload, I mean crapload - 104 of them, to be
exact.

Once that was installed, I tried running the above command (as a user
[non-root] account). It then figured out that it had not been run before,
so it did another route of mega-installing of stuff from here, there, and
everywhere. At some points during this process, it would seem to hang,
producing no output and consuming 100% CPU - doing God-knows-what.

But, fortunately it would seem, no error messages (yet).

Finally, that part ended, and it got to the business at hand - of actually
building the .deb file. That failed with some obscure error messages and
the whole process aborted. Just for safety, I tried it again, but with the
same result.

I think I've run into this before Perl, where it just seems to take on a
gargantuan task that it isn't quite capable of finishing. I've also seen
it with a similar product called "Python". Very similar...

Anyway, fortunately, both of the following are true:

1) This was always just an academic project for me. I'm perfectly
happy using ordinary "find" - seems more reliable, although I have
been impressed with how well find2perl actually does work (if you
can get it installed...)

2) I *was* able to take the script (/usr/bin/find2perl) from another
system (*) and copy it over to the new system (**) and it works
fine, so problem solved (more or less).

Still curious why it didn't work, but not enough so to spend any more time
on it...

(*) An earlier version of the OS, where find2perl *was* part of Perl.

(**) A newer version of the same OS, where find2perl is not part of Perl.

>sudo dpkg -i *find2perl*.deb
>
>Or so says
>https://wiki.debian.org/PerlFAQ

--
That's the Trump playbook. Every action by Trump or his supporters can
be categorized as one (or more) of:

outrageous, incompetent, or mentally ill.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor