# # Number non-empty lines. # Displays all input, preceding non-empty lines with # a line number. The line count is incremented only # for non-empty lines. # # Modification of Al Aab's line numbering script # by Eric Pement . # # This script will operate on standard input, # or, if given, a file specified as argument 1. # sed "/^ *$/! =" $1 | sed "/^ *$/! {N;s/\n/ /;}"