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