💾 Archived View for runjimmyrunrunyoufuckerrun.com › rc › anagram captured on 2022-03-01 at 15:20:17.

View Raw

More Information

⬅️ Previous capture (2021-12-17)

-=-=-=-=-=-=-

#!/bin/rc
rfork e
if(~ $#* 0) w = `{fortune /lib/words}
if not w = $*
echo $w | awk '{
	srand
	n = split($0, a, "");
	while(n){
		i = int(n*rand()) + 1
		printf "%s", a[i]
		a[i] = a[n--]
	}
	printf "\n"
}'
if(! ~ $#* 0) exit
fn sighup sigint sigterm{
	echo answer was $w
	exit
}
while(! ~ `{read} $w);
echo well done!