Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

6 May, 2024: The networking issue during the past two days has been identified and may be fixed. Will keep monitoring.


devel / comp.unix.shell / Generate words that contain only a certain character set

SubjectAuthor
* Generate words that contain only a certain character setOttavio Caruso
+* Re: Generate words that contain only a certain character setJanis Papanagnou
|`* Re: Generate words that contain only a certain character setJanis Papanagnou
| `* Re: Generate words that contain only a certain character setAndy Walker
|  `* Re: Generate words that contain only a certain character setOttavio Caruso
|   `- Re: Generate words that contain only a certain character setJanis Papanagnou
`- Re: Generate words that contain only a certain character setEd Morton

1
Generate words that contain only a certain character set

<siha1k$66d$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ottavio2...@yahoo.com (Ottavio Caruso)
Newsgroups: comp.unix.shell
Subject: Generate words that contain only a certain character set
Date: Thu, 23 Sep 2021 08:23:31 +0100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <siha1k$66d$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 23 Sep 2021 07:23:32 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="853e488f402b8d7ef167d9a34d1cf283";
logging-data="6349"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX188Gr3GIMmxX20gixMn2lv4vcfEOrirZf0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.0.3
Cancel-Lock: sha1:6Uoe4HgJPYTc8sE4gCYQyace4q8=
X-No-Archive: yes
Content-Language: en-GB
 by: Ottavio Caruso - Thu, 23 Sep 2021 07:23 UTC

Hi,

1) is there a Unix/Linux program that can generate words (not random
characters) out of a set of characters (say: "5.tpiuongf"). If this
doesn't exist:

2) Is it possible to write a script that does the above out of, for
example, /usr/share/dict/* ?

So, I want to find all lines that contain _only_ one or more of any of
"5.tpiuongf".

Naively, I started experimenting with [e]grep but I suspect it's not the
right way.

--
Ottavio Caruso

Re: Generate words that contain only a certain character set

<sihg67$69c$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!LTi+xflewmQTbbz7H4hZOQ.user.46.165.242.75.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Generate words that contain only a certain character set
Date: Thu, 23 Sep 2021 11:08:23 +0200
Organization: Aioe.org NNTP Server
Message-ID: <sihg67$69c$1@gioia.aioe.org>
References: <siha1k$66d$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="6444"; posting-host="LTi+xflewmQTbbz7H4hZOQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Janis Papanagnou - Thu, 23 Sep 2021 09:08 UTC

On 23.09.21 09:23, Ottavio Caruso wrote:
> Hi,
>
> 1) is there a Unix/Linux program that can generate words (not random
> characters) out of a set of characters (say: "5.tpiuongf"). If this
> doesn't exist:
>
> 2) Is it possible to write a script that does the above out of, for
> example, /usr/share/dict/* ?
>
> So, I want to find all lines that contain _only_ one or more of any of
> "5.tpiuongf".
>
> Naively, I started experimenting with [e]grep but I suspect it's not the
> right way.

Well, in the past I had used to use awk for that, as in

awk '!/[^5.tpiuongf]/'

(i.e. working with double negation).

Janis

Re: Generate words that contain only a certain character set

<sihgj2$ams$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!rocksolid2!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!aioe.org!LTi+xflewmQTbbz7H4hZOQ.user.46.165.242.75.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Generate words that contain only a certain character set
Date: Thu, 23 Sep 2021 11:15:14 +0200
Organization: Aioe.org NNTP Server
Message-ID: <sihgj2$ams$1@gioia.aioe.org>
References: <siha1k$66d$1@dont-email.me> <sihg67$69c$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="10972"; posting-host="LTi+xflewmQTbbz7H4hZOQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Janis Papanagnou - Thu, 23 Sep 2021 09:15 UTC

On 23.09.21 11:08, Janis Papanagnou wrote:
> On 23.09.21 09:23, Ottavio Caruso wrote:
>> Hi,
>>
>> 1) is there a Unix/Linux program that can generate words (not random
>> characters) out of a set of characters (say: "5.tpiuongf"). If this
>> doesn't exist:
>>
>> 2) Is it possible to write a script that does the above out of, for
>> example, /usr/share/dict/* ?
>>
>> So, I want to find all lines that contain _only_ one or more of any of
>> "5.tpiuongf".
>>
>> Naively, I started experimenting with [e]grep but I suspect it's not the
>> right way.
>
> Well, in the past I had used to use awk for that, as in
>
> awk '!/[^5.tpiuongf]/'
>
> (i.e. working with double negation).

Using grep with the same logic is of course also possible

grep -v '[^5.tpiuongf]'

> Janis
>

Re: Generate words that contain only a certain character set

<sihs7d$cn$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!k03buBvHr7vkGaN2ImDPQQ.user.46.165.242.75.POSTED!not-for-mail
From: anw...@cuboid.co.uk (Andy Walker)
Newsgroups: comp.unix.shell
Subject: Re: Generate words that contain only a certain character set
Date: Thu, 23 Sep 2021 13:33:49 +0100
Organization: Not very much
Message-ID: <sihs7d$cn$1@gioia.aioe.org>
References: <siha1k$66d$1@dont-email.me> <sihg67$69c$1@gioia.aioe.org>
<sihgj2$ams$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="407"; posting-host="k03buBvHr7vkGaN2ImDPQQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Andy Walker - Thu, 23 Sep 2021 12:33 UTC

On 23/09/2021 10:15, Janis Papanagnou wrote:
> Using grep with the same logic is of course also possible
> grep -v '[^5.tpiuongf]'

FWIW,

grep '^[5.tpiuongf]*$'

works here, and is one character shorter.

--
Andy Walker, Nottingham.
Andy's music pages: www.cuboid.me.uk/andy/Music
Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Jessel

Re: Generate words that contain only a certain character set

<sihtuo$d95$1@dont-email.me>

  copy mid

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

  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: Generate words that contain only a certain character set
Date: Thu, 23 Sep 2021 08:03:20 -0500
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <sihtuo$d95$1@dont-email.me>
References: <siha1k$66d$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 23 Sep 2021 13:03:21 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c207d5737beaa3d6853d1ad8c97b1a49";
logging-data="13605"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/i1EfK4hvspuT73vE8Q4r+"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
Cancel-Lock: sha1:s52r2YdZB6ZF6d3YRW8P0ZcMg2k=
In-Reply-To: <siha1k$66d$1@dont-email.me>
X-Antivirus-Status: Clean
Content-Language: en-US
X-Antivirus: Avast (VPS 210923-0, 9/22/2021), Outbound message
 by: Ed Morton - Thu, 23 Sep 2021 13:03 UTC

On 9/23/2021 2:23 AM, Ottavio Caruso wrote:
> Hi,
>
> 1) is there a Unix/Linux program that can generate words (not random
> characters) out of a set of characters (say: "5.tpiuongf"). If this
> doesn't exist:
>
> 2) Is it possible to write a script that does the above out of, for
> example, /usr/share/dict/* ?
>
> So, I want to find all lines that contain _only_ one or more of any of
> "5.tpiuongf".
>
> Naively, I started experimenting with [e]grep but I suspect it's not the
> right way.
>

I'm trying to understand what you mean by "word" and the difference
between a "word" and a string of random characters to you.

Can you define "word" in your context and give examples of words that
contain "." and/or "5"?

Do you just want a script that will generate random combinations of a
specific set of characters as opposed to random combinations of all
characters?

If so is there any limit to how long those strings could be or how many
times 1 character can repeat or how many of the target characters the
string has to contain or how close duplicates of each character can be
to each other or requirements to contain some vowels or anything else?

Ed.

Re: Generate words that contain only a certain character set

<sihun7$heu$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ottavio2...@yahoo.com (Ottavio Caruso)
Newsgroups: comp.unix.shell
Subject: Re: Generate words that contain only a certain character set
Date: Thu, 23 Sep 2021 14:16:23 +0100
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <sihun7$heu$1@dont-email.me>
References: <siha1k$66d$1@dont-email.me> <sihg67$69c$1@gioia.aioe.org>
<sihgj2$ams$1@gioia.aioe.org> <sihs7d$cn$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 23 Sep 2021 13:16:23 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="853e488f402b8d7ef167d9a34d1cf283";
logging-data="17886"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bPrwZGgDCbj7JrzMf2YRXeD9FMcDJXHk="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.0.3
Cancel-Lock: sha1:JyimwyooFrpp7zXFmSBR7NZgzZ0=
X-No-Archive: yes
In-Reply-To: <sihs7d$cn$1@gioia.aioe.org>
Content-Language: en-GB
 by: Ottavio Caruso - Thu, 23 Sep 2021 13:16 UTC

On 23/09/2021 13:33, Andy Walker wrote:
> On 23/09/2021 10:15, Janis Papanagnou wrote:
>> Using grep with the same logic is of course also possible
>>    grep -v '[^5.tpiuongf]'
>
> FWIW,
>
>      grep '^[5.tpiuongf]*$'
>
> works here, and is one character shorter.
>

Fantastic, that's exactly what I was looking for.

One question: do I not have to escape the dot [.]?

--
Ottavio Caruso

Re: Generate words that contain only a certain character set

<sii1rb$q8j$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!LTi+xflewmQTbbz7H4hZOQ.user.46.165.242.75.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Generate words that contain only a certain character set
Date: Thu, 23 Sep 2021 16:09:47 +0200
Organization: Aioe.org NNTP Server
Message-ID: <sii1rb$q8j$1@gioia.aioe.org>
References: <siha1k$66d$1@dont-email.me> <sihg67$69c$1@gioia.aioe.org>
<sihgj2$ams$1@gioia.aioe.org> <sihs7d$cn$1@gioia.aioe.org>
<sihun7$heu$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="26899"; posting-host="LTi+xflewmQTbbz7H4hZOQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Janis Papanagnou - Thu, 23 Sep 2021 14:09 UTC

On 23.09.21 15:16, Ottavio Caruso wrote:
> On 23/09/2021 13:33, Andy Walker wrote:
>> On 23/09/2021 10:15, Janis Papanagnou wrote:
>>> Using grep with the same logic is of course also possible
>>>    grep -v '[^5.tpiuongf]'
>>
>> FWIW,
>>
>>       grep '^[5.tpiuongf]*$'
>>
>> works here, and is one character shorter.
>>
>
> Fantastic, that's exactly what I was looking for.
>
> One question: do I not have to escape the dot [.]?

Not if it's inside the [].

(You can test that it's not matching "any character" here.)

Janis

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor