From 152ee9b622b192cb151217ce3684c05ff898947f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20W=C3=BCnsche?= <42999314+thomaswuensche@users.noreply.github.com> Date: Mon, 4 Jan 2021 15:52:10 +0100 Subject: [PATCH] sort: add output file example (#5040) --- pages/common/sort.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/sort.md b/pages/common/sort.md index d88ff15fee..5fdc561e13 100644 --- a/pages/common/sort.md +++ b/pages/common/sort.md @@ -27,9 +27,9 @@ `sort -u {{path/to/file}}` -- Sort human-readable numbers (in this case the 5th field of `ls -lh`): +- Sort a file, printing the output to the specified output file (can be used to sort a file in-place): -`ls -lh | sort -h -k 5` +`sort --output={{path/to/file}} {{path/to/file}}` - Sort numbers with exponents: