summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-07-20 12:50:27 -0500
committerCase Duckworth2022-07-20 12:50:27 -0500
commitb7cc61f40e8247e8874c9e4e26052cc410e7c570 (patch)
treeb33bcc16984effb8a4014add414cf083c8386938
downloadk7r-main.tar.gz
k7r-main.zip
I5l c4t HEAD main
-rwxr-xr-xk7r18
1 files changed, 18 insertions, 0 deletions
diff --git a/k7r b/k7r new file mode 100755 index 0000000..3827e85 --- /dev/null +++ b/k7r
@@ -0,0 +1,18 @@
1#!/bin/awk -f
2#k7r: k8serizer
3{
4 split($0, words, FS)
5 for (w in words) {
6 printf "%s ", k8serize(words[w])
7 }
8 printf "\n"
9}
10
11
12function k8serize(word)
13{
14 if (! match(word, /.(.*)./)) {
15 return (word "0")
16 }
17 return (substr(word, 1, 1) (RLENGTH - 2) substr(word, RSTART + RLENGTH - 1))
18}