From 2ecc25e812dcb24dda5d59e6a4cb28c196f9b97d Mon Sep 17 00:00:00 2001 From: Fazle Arefin Date: Sun, 5 May 2024 19:08:28 +1000 Subject: [PATCH] cut: edit page (#12733) --- pages/common/cut.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pages/common/cut.md b/pages/common/cut.md index c5f7cba3c..08f58d723 100644 --- a/pages/common/cut.md +++ b/pages/common/cut.md @@ -3,14 +3,18 @@ > Cut out fields from `stdin` or files. > More information: . -- Print a specific character/field range of each line: +- Print a specific [c]haracter/[f]ield range of each line: `{{command}} | cut --{{characters|fields}} {{1|1,10|1-10|1-|-10}}` -- Print a field range of each line with a specific delimiter: +- Print a [f]ield range of each line with a specific [d]elimiter: `{{command}} | cut --delimiter "{{,}}" --fields {{1}}` -- Print a character range of each line of the specific file: +- Print a [c]haracter range of each line of the specific file: `cut --characters {{1}} {{path/to/file}}` + +- Print specific [f]ields of `NUL` terminated lines (e.g. as in `find . -print0`) instead of newlines: + +`{{command}} | cut --zero-terminated --fields {{1}}`