perl -e"print substr$_,6 for sort map{sprintf('%02d'x3).$_,/^(\d+)-(\d+)-(\d+)/} <>" junk