BEGIN {FS = ":" saveit = 0} $3 > saveit && $3 < 60000 {saveit = $3} END {print "Next available UID is " saveit + 1}