diff options
Diffstat (limited to 'fucktrain')
-rwxr-xr-x | fucktrain | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/fucktrain b/fucktrain new file mode 100755 index 0000000..c93a708 --- /dev/null +++ b/fucktrain | |||
@@ -0,0 +1,35 @@ | |||
1 | #!/bin/awk -f | ||
2 | # FUCKTRAIN: FUCKAMUTHA CHOO CHOO -*- awk -*- | ||
3 | # Author: Case Duckworth <acdw@acdw.net> | ||
4 | # License: WTFPL | ||
5 | # Version: #9 | ||
6 | BEGIN { | ||
7 | print "ALL ABOARD" | ||
8 | } | ||
9 | |||
10 | { | ||
11 | gsub(/[^-+<>.,\[\]]/, "", $0) | ||
12 | gsub(/+/, "chug ", $0) | ||
13 | gsub(/-/, "chugga ", $0) | ||
14 | gsub(/>/, "choo\n", $0) | ||
15 | gsub(/</, "choo choo\n", $0) | ||
16 | gsub(/\./, clicketyClick(), $0) | ||
17 | gsub(/,/, "clack ", $0) | ||
18 | gsub(/\[/, "tickets please ", $0) | ||
19 | gsub(/\]/, "your ticket please ", $0) | ||
20 | |||
21 | } | ||
22 | |||
23 | END { | ||
24 | print "END OF THE LINE" | ||
25 | } | ||
26 | |||
27 | |||
28 | function clicketyClick() | ||
29 | { | ||
30 | if (rand() <= 0.5) { | ||
31 | return "click" | ||
32 | } else { | ||
33 | return "clickety" | ||
34 | } | ||
35 | } | ||