m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/awk.md
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2019-11-03 22:40:16 +0100
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2019-11-03 22:40:16 +0100
commitaa148e2a7d531ec3402208096b31a81dda8a81b9 (patch)
tree4e7921050b4ad5557cf3f70da3dadfad6205bbfc /awk.md
parentb911c20734202466d1956bd7362d55c63dd44da1 (diff)
Reminder about shell interpolation
Diffstat (limited to 'awk.md')
-rw-r--r--awk.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/awk.md b/awk.md
index 12c7772..8e8499a 100644
--- a/awk.md
+++ b/awk.md
@@ -7,6 +7,8 @@
Program is ;-separated pattern-action statements.
/pattern/ { action }
+ # e.g. (apostrophes to not interpolate shell vars
+ awk '/tt/ { print $1 }' awk.md
`$0` is whole line, `$1`, `$2`, ... are fields separated by `FS` (by default,
whitespace).