Debian Codegraph @

print-missing-subranges

raw
1 #!/bin/bash -norc
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 # find missing subranges in list of ordered numbers
7 awk '($1 != p+1) { print p+1 "-" $1-1} { p=$1 }' "$@"