From d4bd8a7d95de990a00c8d6242869dddd04a8241c Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Tue, 30 Dec 2025 20:28:07 +0200 Subject: [PATCH] cut: add example (#20437) --- pages/common/cut.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/cut.md b/pages/common/cut.md index 1238480741..bf8572dac9 100644 --- a/pages/common/cut.md +++ b/pages/common/cut.md @@ -23,6 +23,10 @@ `{{command}} | cut {{[-d|--delimiter]}} " " {{[-f|--fields]}} -3` +- Do not print lines that do not contain the delimiter: + +`{{command}} | cut {{[-d|--delimiter]}} "{{:}}" {{[-f|--fields]}} {{1}} {{[-s|--only-delimited]}}` + - Print specific fields of lines that use `NUL` to terminate lines instead of newlines: `{{find . -print0}} | cut {{[-z|--zero-terminated]}} {{[-d|--delimiter]}} "{{/}}" {{[-f|--fields]}} {{2}}`