File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 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 `
You can’t perform that action at this time.
0 commit comments