From 0c31b8e434d634c81479bf396c752d1baaff7603 Mon Sep 17 00:00:00 2001 From: johannst Date: Fri, 23 Sep 2022 18:47:33 +0000 Subject: deploy: 47218d271f20b39610d5f63b3bc7dfc86642bdba --- print.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'print.html') diff --git a/print.html b/print.html index bec2e28..6466334 100644 --- a/print.html +++ b/print.html @@ -1132,6 +1132,10 @@ but this is a function and return value can be assigned to a variable.

The pattern NR%2 == 0 matches every second record and the action { print $0 } prints the whole record.

+

Negative patterns

+
awk '!/^#/ { print $1 }' <file>
+
+

Matches records not starting with #.

Access last fields in records

echo 'a b c d e f' | awk '{ print $NF $(NF-1) }'
 
-- cgit v1.2.3