doc: fix awk example for getting penultimate field

* doc/coreutils.texi (cut invocation): Add required brackets.
Fixes http://bugs.gnu.org/26519
This commit is contained in:
Bo Rydberg authored and Pádraig Brady committed 2017-04-16 19:10:17 -07:00
1 parent ba5fe2d4b8
commit 8d34b455f8
1 file changed
+3 -3
+3 -3
View File
@@ -5941,9 +5941,9 @@ By default @command{awk} uses (and discards) runs of blank characters
to separate fields, and ignores leading and trailing blanks.
@example
@verbatim
awk '{print $2}' # print the second field
awk '{print $NF-1}' # print the penultimate field
awk '{print $2,$1}' # reorder the first two fields
awk '{print $2}' # print the second field
awk '{print $(NF-1)}' # print the penultimate field
awk '{print $2,$1}' # reorder the first two fields
@end verbatim
@end example
Note while @command{cut} accepts field specifications in