summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-10-14 21:10:06 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-10-14 21:10:06 -0700
commitfd056096bfeaedfead5ad8a64b38b9e057188ad2 (patch)
tree50697e2d3470c19d46ebd96a8e3a78c1bf86a363
parentdde754e10fe1d1ac94d3910c1fe8ee8596e3352d (diff)
downloadtxr-fd056096bfeaedfead5ad8a64b38b9e057188ad2.tar.gz
txr-fd056096bfeaedfead5ad8a64b38b9e057188ad2.tar.bz2
txr-fd056096bfeaedfead5ad8a64b38b9e057188ad2.zip
doc: shorten some POSIX awk examples.
* txr.1: Remove unnecessary test for the existence of a field, since the find function accepts nil. Use len instead of length.
-rw-r--r--txr.14
1 files changed, 2 insertions, 2 deletions
diff --git a/txr.1 b/txr.1
index f349b4a5..9595fff2 100644
--- a/txr.1
+++ b/txr.1
@@ -49741,7 +49741,7 @@ while the fourth one doesn't:
Print lines containing a backslash in the second field:
.cblk
- (awk ((and [f 1] (find #\e\e [f 1]))))
+ (awk ((find #\e\e [f 1])))
.cble
.IP 7.
Print lines containing a backslash using a regex constructed
@@ -49785,7 +49785,7 @@ by producing a single string first:
Print lines longer than 72 characters:
.cblk
- (awk ((> (length rec) 72)))
+ (awk ((> (len rec) 72)))
.cble
.IP 11.
Print first two fields in reverse order, separated by