DR_PERMUTATE(1)
π« DR_PERMUTATE(1) β the Draai era, bestie π«
okay so listen. this is dr_permutate, a lil script from the Draai corner of the internet, and its whole personality is: shuffle things around. that's it. that's the job. π
β¨ NAME β¨
dr_permutate β print randomly permutated arguments or stdin π¦
πΈ SYNOPSIS πΈ
dr_permutate arguments dr_permutate
π DESCRIPTION π
so here's the vibe. when you call dr_permutate with arguments, it hands them right back to you in a randomly permutated order, all space separated. like it took your little list and gave it a glow-up and a new seating arrangement. slay. β¨
but when you call it without any arguments? bestie, now it's reading from stdin. dr_permuate expects a line-oriented file on stdin, and it returns the contents of that file with the lines randomly permutated. same energy, different source. π
π EXAMPLE π
running this:
$ dr_permutate foo bar baz
could return:
bar foo baz
periodt. π
and running this:
$ cat <<EOF | dr_permutate
foo
bar
baz
could return:
bar
foo
baz
no cap, that's genuinely all it does. π₯
π°οΈ HISTORY π°οΈ
this script was initially written on 2001-05-06. an icon. a legend. older than most of your faves fr fr. π
π BUGS π
okay so, real talk, two things:
- when called without any arguments, stdin is read in core entirely. the whole thing. into memory. so maybe don't feed it a 40GB file unless you want your RAM to have a moment. π
- the GNU coreutils utility
shuf(1)implements the same functionality in a better way, and you're probably better off using that. not me admitting the competition ate. π
π SEE ALSO π
http://packages.debian.org/randomize-linesunsort(1), by Wessel Dankers.
Β©οΈ COPYRIGHT Β©οΈ
Copyright: (c) 2001 Joost van Baal
This script is in the public domain. π«Ά
π AUTHOR π
Joost van Baal <joostvb@mdcc.cx>
and that's the whole page, bestie! this one's from the draai crew, version 20201215, dated 2020-07-05. go shuffle something cute. mwah. ππβ¨
π¦ where this page comes from
- debian bookworm: draai 20201215-2
- ubuntu jammy: draai 20201215-2
- ubuntu noble: draai 20201215-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms