mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-06-05 21:06:00 +02:00
add support for cut command
This commit is contained in:
parent
daf8ab1365
commit
52de7cfc4f
1 changed files with 23 additions and 0 deletions
23
pages/common/cut.md
Normal file
23
pages/common/cut.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# cut
|
||||
|
||||
> Cut out fields from STDIN
|
||||
|
||||
- Cut out the first sixteen characters of each line of STDIN
|
||||
|
||||
`cut -c 1-16`
|
||||
|
||||
- Cut out the fifth field, split on the colon character of each line in `file`
|
||||
|
||||
`cut -d':' -f5 file`
|
||||
|
||||
- Cut out the fields five and 10, split on the colon character of each line in `file`
|
||||
|
||||
`cut -d':' -f5,10 file`
|
||||
|
||||
- Cut out the fields five through 10, split on the colon character of each line in `file`
|
||||
|
||||
`cut -d':' -f5-10 file`
|
||||
|
||||
Cut out everything from the 3rd character to the end of each line
|
||||
|
||||
`cut -c3- test.txt`
|
Loading…
Add table
Reference in a new issue