Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Swap read error. You lose your mind.


devel / comp.unix.shell / Is there a standard Unix tool to create permutations?

SubjectAuthor
* Is there a standard Unix tool to create permutations?Janis Papanagnou
+- Re: Is there a standard Unix tool to create permutations?Ed Morton
`* Re: Is there a standard Unix tool to create permutations?Lew Pitcher
 `- Re: Is there a standard Unix tool to create permutations?Janis Papanagnou

1
Is there a standard Unix tool to create permutations?

<t1culq$ff$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Is there a standard Unix tool to create permutations?
Date: Tue, 22 Mar 2022 17:48:57 +0100
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <t1culq$ff$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 22 Mar 2022 16:48:58 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="a44e464f443ec47a0bb95e6dff82c680";
logging-data="495"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18LetpVQTdegF7zaZebibWb"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:lf3L5hBmb4LLevG3yvvwaYy1LSk=
X-Mozilla-News-Host: news://news.eternal-september.org:119
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Tue, 22 Mar 2022 16:48 UTC

Is there a standard Unix tool to create permutations?

I am using 'shuf' to create permutations of data, and in
GNU context I can also use 'sort -R' for that, it seems.
But inspecting the utilities section of the POSIX specs I
haven't found any tool for that purpose. - Is there any?

Note: I can of course use awk and program my own function,
but I was looking for a - similar to 'shuf' - ready to use
standard tool.

Janis

Re: Is there a standard Unix tool to create permutations?

<t1d1gd$not$1@dont-email.me>

 copy mid

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

 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: Is there a standard Unix tool to create permutations?
Date: Tue, 22 Mar 2022 12:37:17 -0500
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <t1d1gd$not$1@dont-email.me>
References: <t1culq$ff$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 22 Mar 2022 17:37:17 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="27b95b6d69812935f2df3882b0d0fa9a";
logging-data="24349"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/g33zdcYBrY1sAMhq1+wYI"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Cancel-Lock: sha1:HCcThtE2uVlc53dY9Hl+WRrMES8=
In-Reply-To: <t1culq$ff$1@dont-email.me>
X-Antivirus-Status: Clean
Content-Language: en-US
X-Antivirus: Avast (VPS 220322-2, 3/22/2022), Outbound message
 by: Ed Morton - Tue, 22 Mar 2022 17:37 UTC

On 3/22/2022 11:48 AM, Janis Papanagnou wrote:
> Is there a standard Unix tool to create permutations?
>
> I am using 'shuf' to create permutations of data, and in
> GNU context I can also use 'sort -R' for that, it seems.
> But inspecting the utilities section of the POSIX specs I
> haven't found any tool for that purpose. - Is there any?
>
> Note: I can of course use awk and program my own function,
> but I was looking for a - similar to 'shuf' - ready to use
> standard tool.
>
> Janis

I've seen so many Q&A online about permutations over the years with
no-one ever suggesting a Unix tool that does it that I think I can
safely say "no".

Ed.

Re: Is there a standard Unix tool to create permutations?

<t1d439$f40$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.unix.shell
Subject: Re: Is there a standard Unix tool to create permutations?
Date: Tue, 22 Mar 2022 18:21:29 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <t1d439$f40$1@dont-email.me>
References: <t1culq$ff$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 22 Mar 2022 18:21:29 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="2e5a35dd89ec16315f776aeef688dd02";
logging-data="15488"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/1VzudsJXKTnxRpG6d6UW7e2iD6y623TY="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:E5tQeKxkvF30QPSoGD1QYo+s9Nk=
 by: Lew Pitcher - Tue, 22 Mar 2022 18:21 UTC

On Tue, 22 Mar 2022 17:48:57 +0100, Janis Papanagnou wrote:

> Is there a standard Unix tool to create permutations?
>
> I am using 'shuf' to create permutations of data, and in
> GNU context I can also use 'sort -R' for that, it seems.
> But inspecting the utilities section of the POSIX specs I
> haven't found any tool for that purpose. - Is there any?
>
> Note: I can of course use awk and program my own function,
> but I was looking for a - similar to 'shuf' - ready to use
> standard tool.

Don't know if this fits your use-case, but the ptx(1) command
permutes it's inputs. ptx(1) builds a permuted index of a
file's contents, and is used to create the "permuted index"
index page in unix (paper) manuals.

Perhaps the permutations that ptx(1) builds will suffice for
your use-case

HTH
--
Lew Pitcher
"In Skills, We Trust"

Re: Is there a standard Unix tool to create permutations?

<t1fbrt$jc1$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!rocksolid2!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Is there a standard Unix tool to create permutations?
Date: Wed, 23 Mar 2022 15:46:20 +0100
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <t1fbrt$jc1$1@dont-email.me>
References: <t1culq$ff$1@dont-email.me> <t1d439$f40$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 23 Mar 2022 14:46:21 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="08198feb9e6c50a0a9f7bba497bf4b5c";
logging-data="19841"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+AfHb48UG//wBNfCSKY9Xz"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:U4KXnq/D367CiTAx41hC7C72Yow=
In-Reply-To: <t1d439$f40$1@dont-email.me>
 by: Janis Papanagnou - Wed, 23 Mar 2022 14:46 UTC

On 22.03.2022 19:21, Lew Pitcher wrote:
> On Tue, 22 Mar 2022 17:48:57 +0100, Janis Papanagnou wrote:
>
>> Is there a standard Unix tool to create permutations?
>>
>> I am using 'shuf' to create permutations of data, and in
>> GNU context I can also use 'sort -R' for that, it seems.
>> But inspecting the utilities section of the POSIX specs I
>> haven't found any tool for that purpose. - Is there any?
>>
>> Note: I can of course use awk and program my own function,
>> but I was looking for a - similar to 'shuf' - ready to use
>> standard tool.
>
> Don't know if this fits your use-case, but the ptx(1) command
> permutes it's inputs. ptx(1) builds a permuted index of a
> file's contents, and is used to create the "permuted index"
> index page in unix (paper) manuals.
>
> Perhaps the permutations that ptx(1) builds will suffice for
> your use-case

On first glance it seems to be as usable as shuf is. Though I
cannot find this tool as standard tool of the POSIX utilities
as well. - As indicated, I can already solve the task. I was
just looking whether there's a standard tool I could use just
in case that I had to work in a standard environment. Thanks.

Janis

>
> HTH
>

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor