Debian Codegraph @

just-top-hits

raw
1 #!/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 limit=1
7
8 if [ $# -gt 0 ]
9 then
10 limit=$1
11 shift
12 fi
13
14 awk -v limit=$limit -F '\t' '(NR == 1) { key = $1 } ($1 != key) { key = $1; limit-- } (limit < 1) { exit } { print }'