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 /games/drakon.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 'games/drakon.awk')
-rw-r--r-- | games/drakon.awk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/games/drakon.awk b/games/drakon.awk index ce619585..ebca4e95 100644 --- a/games/drakon.awk +++ b/games/drakon.awk @@ -6,7 +6,7 @@ tog = 0 for (i = 1; i <= len; i++) { chr = substr($0, i, 1) - if (chr ~ /[[:alpha:]]/) + if (chr ~ /[a-zA-Z]/) chr = (tog = !tog) ? tolower(chr) : toupper(chr) lin = lin chr } |