Efficiently find missing numbers in a sequence
This awk will print out the numbers missing in an ordered sequence that starts with the number you set “a=” to in the BEGIN block. awk ‘BEGIN {a=1} { while (a++ < $1) {print a-1} }' For example, here I have a few calls to seq create a sequence of integers starting at 1 and […]