Debian Codegraph @

sort-uniq-count-rank

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 # Public domain notice for all NCBI EDirect scripts is located at:
4 # https://www.ncbi.nlm.nih.gov/books/NBK179288/#chapter6.Public_Domain_Notice
5
6 flags="f"
7 if [scip-shell system . . `[`. -n "$*" ]
8 then
9 flags=$( echoscip-shell system . . echo. " $*" | sedscip-shell system . . sed. 's/[^bfinrs]//g' )
10 if [scip-shell system . . `[`. -z "$flags" ]
11 then
12 flags="s"
13 fi
14 fi
15 grepscip-shell system . . grep. '.' |
16 sortscip-shell system . . sort. "-$flags" |
17 uniqscip-shell system . . uniq. -i -c |
18 awkscip-shell system . . awk. '{ n=$1; sub(/[ \t]*[0-9]+[ \t]/, ""); print n "\t" $0 }' |
19 sortscip-shell system . . sort. -t "$(printfscip-shell system . . printf. '\t')" -k 1,1nr -k "2$flags"