diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-05-01 14:57:52 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-05-01 14:57:52 +0200 |
commit | b737cc8ca5bb8ca5e07cd0151d678a7b4b10d5cb (patch) | |
tree | 86814d8fb3557ea2cbf73892dd0ec4e590e854de /src/tools/sort.md | |
parent | 50e07a8bca68d2f568df44166fa94383141c2696 (diff) | |
download | notes-b737cc8ca5bb8ca5e07cd0151d678a7b4b10d5cb.tar.gz notes-b737cc8ca5bb8ca5e07cd0151d678a7b4b10d5cb.zip |
cli: add new group for cli foo tools
Diffstat (limited to 'src/tools/sort.md')
-rw-r--r-- | src/tools/sort.md | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/tools/sort.md b/src/tools/sort.md deleted file mode 100644 index e74b490..0000000 --- a/src/tools/sort.md +++ /dev/null @@ -1,35 +0,0 @@ -# sort(1) - -``` -sort [opts] [file] - opts: - -r reverse output - -b ignore leading blanks - - -n sort by numeric - -h sort by human numeric - -V sort by version - - -k<N> sort by Nth key - -t<S> field separator -``` - -## Examples -```sh -# Sort by directory sizes. -du -sh * | sort -h -``` - -```sh -# Sort numeric by second key. -# The default key separator is non-blank to blank transition. -echo 'a 4 -d 10 -c 21' | sort -k2 -n - -# Sort numeric by second key, split at comma. -echo 'a,4 -d,10 -c,21' | sort -k2 -n -t, -``` -> Use `--debug` to annotate part of the line used to sort and hence debug the key usage. |