plan9fox/rc/bin/valley

26 lines
322 B
Text
Raw Normal View History

2013-01-27 22:36:05 +00:00
#!/bin/awk -f
BEGIN {
srand
2013-01-27 22:36:05 +00:00
phrases=", like,\
, y'know,\
, or whatever,\
, umm,\
, for sure,"
len=split (phrases, phrase, /\n/)
}
{
split ( $0, parts, /,/)
for (i=1; i<length(parts); i++) {
printf "%s", parts[i]
2013-01-28 02:54:17 +00:00
ind = 1+int(rand * 1000)%len;
2013-01-27 22:36:05 +00:00
printf "%s", phrase[ind]
}
print parts[i]
# print $0
}