aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-06-02 18:28:57 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-06-02 18:28:57 +1200
commit56c8ada346bde4ea44e199020c03afd731727bd6 (patch)
tree65846ea2ea00eeb2bae3d008c9e0ab405a3f66d6 /bin
parentAdd skip-pager to ~/.my.cnf (diff)
downloaddotfiles-56c8ada346bde4ea44e199020c03afd731727bd6.tar.gz
dotfiles-56c8ada346bde4ea44e199020c03afd731727bd6.zip
Simplify some awk
Diffstat (limited to 'bin')
-rw-r--r--bin/rfct.awk11
1 files changed, 4 insertions, 7 deletions
diff --git a/bin/rfct.awk b/bin/rfct.awk
index 256841a7..4467f206 100644
--- a/bin/rfct.awk
+++ b/bin/rfct.awk
@@ -6,11 +6,8 @@ BEGIN {
ORS = "\n\n"
}
-{
- # Strip out control characters, except tab and newline
- gsub(/[^[:print:]\n\t]/, "")
+# Strip out control characters, except tab and newline
+{ gsub(/[^[:print:]\n\t]/, "") }
- # If there's anything left, print it
- if (length)
- print
-}
+# If there's anything left, print it
+length($0)