Skip to content

Commit 414571e

Browse files
authored
sort: refresh page (#19783)
1 parent 80c5272 commit 414571e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pages/common/sort.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919

2020
`sort {{[-n|--numeric-sort]}} {{path/to/file}}`
2121

22-
- Sort `/etc/passwd` by the 3rd field of each line numerically, using ":" as a field separator:
22+
- Sort `/etc/passwd` by the 3rd field of each line numerically, using `:` as a field separator:
2323

24-
`sort {{[-t|--field-separator]}} {{:}} {{[-k|--key]}} {{3n}} {{/etc/passwd}}`
24+
`sort {{[-t|--field-separator]}} : {{[-k|--key]}} 3n /etc/passwd`
2525

2626
- As above, but when items in the 3rd field are equal, sort by the 4th field by numbers with exponents:
2727

28-
`sort {{[-t|--field-separator]}} {{:}} {{[-k|--key]}} {{3,3n}} {{[-k|--key]}} {{4,4g}} {{/etc/passwd}}`
28+
`sort {{[-t|--field-separator]}} : {{[-k|--key]}} 3,3n {{[-k|--key]}} 4,4g /etc/passwd`
2929

3030
- Sort a file preserving only unique lines:
3131

3232
`sort {{[-u|--unique]}} {{path/to/file}}`
3333

3434
- Sort a file, printing the output to the specified output file (can be used to sort a file in-place):
3535

36-
`sort {{[-o|--output]}} {{path/to/file}} {{path/to/file}}`
36+
`sort {{[-o|--output]}} {{path/to/output_file}} {{path/to/input_file}}`

0 commit comments

Comments
 (0)