diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-07-02 02:13:25 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-07-02 02:13:25 +1200 |
commit | ca3cc521dd28478c9b51b7c3d9a176835cfa6fa9 (patch) | |
tree | 5b4e733d72785af750fa4cc164e85cff5f3b89b8 /bin/onl.awk | |
parent | Break pks(6df) and philsay(6df) in two (diff) | |
download | dotfiles-ca3cc521dd28478c9b51b7c3d9a176835cfa6fa9.tar.gz dotfiles-ca3cc521dd28478c9b51b7c3d9a176835cfa6fa9.zip |
Remove POSIX char classes from Awk
I forgot that Debian's awk(1) is still a mawk that doesn't implement
e.g. [:alpha:]
Diffstat (limited to 'bin/onl.awk')
-rw-r--r-- | bin/onl.awk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/onl.awk b/bin/onl.awk index 466b8451..15e4f46d 100644 --- a/bin/onl.awk +++ b/bin/onl.awk @@ -2,8 +2,8 @@ # For each line of input ... { - # Strip out non-printable characters and rebuild the fields - gsub(/[[:cntrl:]]/, "") + # Strip out whitespace characters and rebuild the fields + gsub(/[\n\t\r ]+/, "") # Print each field, without a newline; add a leading space if it's not the # very first one |