m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Chrzanowski <martin@celo.org>2019-07-27 17:27:56 -0700
committerMartin Chrzanowski <martin@celo.org>2019-07-27 17:27:56 -0700
commitd20f9efbdda60019bac35849fa99dbb47d3c7551 (patch)
treef58237a5f932e29f0a4fc5ce9aea0ea600420f48
parentc06fcbfb2962efa5b58d9e50197c49602b99e672 (diff)
Add awk cheatsheet
-rw-r--r--awk.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/awk.md b/awk.md
new file mode 100644
index 0000000..12c7772
--- /dev/null
+++ b/awk.md
@@ -0,0 +1,12 @@
+# Awk
+
+## Basics
+
+ awk program file
+
+Program is ;-separated pattern-action statements.
+
+ /pattern/ { action }
+
+`$0` is whole line, `$1`, `$2`, ... are fields separated by `FS` (by default,
+whitespace).