changelog shortlog tags branches changeset files revisions annotate raw help

Mercurial > hg > plan9front / rc/bin/valley

changeset 7243: 34f64dcbbc25
parent: 1e6b57da211e
author: cinap_lenrek@felloff.net
date: Fri, 17 May 2019 18:14:10 +0200
permissions: -rwxr-xr-x
description: 7l: don't hardcode 4k pagesize, use INITRND
1 #!/bin/awk -f
2 
3 BEGIN {
4 srand
5 phrases=", like,\
6 , y'know,\
7 , or whatever,\
8 , umm,\
9 , for sure,"
10 
11 len=split (phrases, phrase, /\n/)
12 }
13 
14 
15 {
16  split ( $0, parts, /,/)
17  for (i=1; i<length(parts); i++) {
18  printf "%s", parts[i]
19  ind = 1+int(rand * 1000)%len;
20  printf "%s", phrase[ind]
21  }
22 print parts[i]
23  # print $0
24 }
25