m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2021-02-16 23:32:16 -0500
committerMarcin Chrzanowski <m@m-chrzan.xyz>2021-02-16 23:32:16 -0500
commit5c1a10b93a5aa2d017e4bf259e4c3bb4ab3fc137 (patch)
tree409ca3d5365d1f05af6fb7f36de1904397086f51
parent707e1dff3eb151904d6ad69a847b763175267b03 (diff)
Add some basic util flags
-rw-r--r--awk.md2
-rw-r--r--find.md16
2 files changed, 18 insertions, 0 deletions
diff --git a/awk.md b/awk.md
index 8e8499a..2c0e1fa 100644
--- a/awk.md
+++ b/awk.md
@@ -12,3 +12,5 @@ Program is ;-separated pattern-action statements.
`$0` is whole line, `$1`, `$2`, ... are fields separated by `FS` (by default,
whitespace).
+
+Set `FS` with `-F <sepstring>`
diff --git a/find.md b/find.md
index f69f25c..b248495 100644
--- a/find.md
+++ b/find.md
@@ -7,3 +7,19 @@
## Regex match
find . -regex pattern # matches whole path
+
+## Formatted printing
+
+ -printf <format>
+
+Action that, instead of just printing the filename of found files, prints a
+formatted string for each.
+
+### Directives
+
+* Time related:
+ * `%A`: access time
+ * `%C`: status change time
+ * `%T`: modification time
+ Each should be followed by a time format specifier, @ gets fractions UNIX time
+* `%p`: filename