Skip to content

Commit 1171580

Browse files
authored
cut: refresh osx page (#19521)
1 parent d86ef64 commit 1171580

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

pages/osx/cut.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,22 @@
33
> Cut out fields from `stdin` or files.
44
> More information: <https://keith.github.io/xcode-man-pages/cut.1.html>.
55
6-
- Print a specific character/field range of each line:
6+
- Print the fifth [c]haracter on each line:
77

8-
`{{command}} | cut -{{c|f}} {{1|1,10|1-10|1-|-10}}`
8+
`{{command}} | cut -c 5`
99

10-
- Print a field range of each line with a specific delimiter:
10+
- Print the fifth to tenth [c]haracter of each line of the specified file:
1111

12-
`{{command}} | cut -d "{{,}}" -f {{1}}`
12+
`cut -c 5-10 {{path/to/file}}`
1313

14-
- Print a character range of each line of a specific file:
14+
- Split each line in a file by a delimiter into fields and print [f]ields two and six (default delimiter is `TAB`):
1515

16-
`cut -c {{1}} {{path/to/file}}`
16+
`cut -f 2,6 {{path/to/file}}`
17+
18+
- Split each line by the specified [d]elimiter and print all from the second [f]ield onward:
19+
20+
`{{command}} | cut -d "{{delimiter}}" -f 2-`
21+
22+
- Use space as a [d]elimiter and print only the first 3 [f]ields:
23+
24+
`{{command}} | cut -d " " -f -3`

0 commit comments

Comments
 (0)