Using nl to number lines

(basic use)
% nl filename

(Include empty lines)
% nl -ba filename

(Left justified number column)
% nl -nln filename