How do I use grep to generate - Ask Ubuntu
how generate list displays lowest numbers in file?
ex.
- list item 2476 jackie woodson :manager: :sales: :05/01/59: 110000
- list item 2000 jack wilson :director: :accounts: :04/19/55: 80000
- list item 7700 wilson ali :executie: :accounts: :08/30/56: 90000
list item 3364 bill wilcocks :manager: :sales: :12/12/55: 65000
list item 4290 neil o'bryan :executive: :accounts: :05/01/59: 100000
list item 2000 wilson albert :chairman: :productions: :03/12/50: 125000
i want list show range between 60000 , 9000 , list using grep
i've tried
grep "[69]" .....$ filename
grep
not numeric comparisons, , not tool use here. i'd use:
sort --field-separator=":" --numeric-sort --reverse --key=7 --ignore-leading-blanks filename | \ tail --lines=3 | \ sort --field-separator=":" --numeric-sort --key=7 --ignore-leading-blanks
Comments
Post a Comment