0.0.14 • Published 7 years agoCLI
newsort
Licence
Apache-2.0
Version
0.0.14
Deps
3
Size
4 kB
Vulns
0
Weekly
0
Installation
newsort requires Node.js v4+ to run.
$ npm install -g newsort
Use
create a file name zipcode and paste in following:
Joe 56789
Sam 45678
Bob 34567
Wendy 23456
Adam 12345
Try if the file is created properly
$ cat zipcode
Joe 56789
Sam 45678
Bob 34567
Wendy 23456
Adam 12345
Get the sorted result
$ newsort zipcode
Adam 12345
Bob 34567
Joe 56789
Sam 45678
Wendy 23456
The -r option just reverses the order of the sort
$ newsort zipcode -r
Wendy 23456
Sam 45678
Joe 56789
Bob 34567
Adam 12345
Use the -k option to sort on a certain column. For example, use "-k 2" to sort on the second column.
$ newsort zipcode -k 2
Adam 12345
Wendy 23456
Bob 34567
Sam 45678
Joe 56789