about summary refs log tree commit diff stats
path: root/fucktrain
blob: d382efaf3d82d120f4f006f68ddebd0ea7dcf110 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/awk -f
# FUCKTRAIN: FUCKAMUTHA CHOO CHOO -*- awk -*-
# Author: Case Duckworth <acdw@acdw.net>
# License: WTFPL
# Version: #9
BEGIN {
	print "ALL ABOARD"
}

{
	gsub(/[^-+<>.,\[\]]/, "", $0)
	gsub(/+/, "chug ", $0)
	gsub(/-/, "chugga ", $0)
	gsub(/>/, "choo\n", $0)
	gsub(/</, "choo choo\n", $0)
	gsub(/\./, clicketyClick(), $0)
	gsub(/,/, "clack ", $0)
	gsub(/\[/, "tickets please ", $0)
	gsub(/\]/, "your ticket please ", $0)
	print
}

END {
	print "END OF THE LINE"
}


function clicketyClick()
{
	if (rand() <= 0.5) {
		return "click "
	} else {
		return "clickety "
	}
}