Brandon S. Allbery writes: >I don't understand what's wrong with > nl | sort -nr | cut -f2- NL doesn't automatically number blank lines, so a more bulletproof version would be: nl -ba | sort +0nr -1 | cut -f2- or one might even try: nl -ba | sort +0nr -1 | newform -l1 -b7 -- tom chapin att!hrccb!tjc tjc at hrccb.att.com