cygwin linux append line number to each end of line

$ sed '/./=' somefile.txt | sed '/./N; s/\n/ /' | sed 's/\([0-9]*\) \(.*\)/\2 \1/'

Comments