removed many useless calls to dh_suidregister; no need to upload for this though
[filters.git] / jibberish
CommitLineData
7e3afbba 1#!/usr/bin/perl
2# jibberish -- run all filters in random order
3
4$ENV{PATH}.=":/usr/games";
5
6@all= qw(
dc17484a 7eleet
8b1ff
9chef
10jethro
11upside-down
12kraut
13cockney
7e3afbba 14jive
7e3afbba 15nyc
dc17484a 16);
17
18@nonfree= qw(
19kyoote
7e3afbba 20newspeak
7e3afbba 21);
22
dc17484a 23# Test to see if non-free filters are here, if so, add them to @all.
24foreach (@nonfree) {
25 if (-x "/usr/games/$_") {
26 push @all, $_;
27 }
28}
29
7e3afbba 30# shuffle order
31srand;
32for (0..$#all) {
33 my $n= @all*rand;
34 my $was= $all[$_];
35 $all[$_]= $all[$n];
36 $all[$n]= $was;
37}
38
39# start the pipe...
40my $pipe= join '|', @all;
41open FILTER, "$pipe|"
42 or die ""Never mind...\n";;
43
44# display the results
45while (<FILTER>) {
46 print $_
47}
48
49# This could be optimized: take the last program off the pipeline,
50# open the pipeline as standard input, then exec that last program.
51#
52# But you have to ask yourself: how important is it to optimize
53# the generation of jibberish?
This page took 0.01205 seconds and 4 git commands to generate.