aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/awk.md
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/awk.md')
-rw-r--r--src/tools/awk.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tools/awk.md b/src/tools/awk.md
index f8aa0a8..9ea4fc5 100644
--- a/src/tools/awk.md
+++ b/src/tools/awk.md
@@ -75,6 +75,11 @@ multiple times. Actions with those patterns are **executed exactly once**.
For floats one can use `%N.Mf`, `N` is the total number including `.` and
`M`.
+- `sprintf("fmt", expr, ...)`
+
+ Format the expressions according to the format string. Similar as `printf`,
+ but this is a function and return value can be assigned to a variable.
+
- `strftime("fmt")`
Print time stamp formatted by `fmt`.
@@ -101,7 +106,7 @@ prints the whole record.
```bash
echo 'a b c d e f' | awk '{ print $NF $(NF-1) }'
```
-Access last fields with arithmetic on the `NR` number of fields variable.
+Access last fields with arithmetic on the `NF` number of fields variable.
### Capture in variables
```bash