3 ms·
> ... because it only numbers non-empty lines... oh, that's just a man page lookup away. use 'nl -ba' which numbers all the lines. default style is '-bt' which
by signa11 9y ago
> ... because it only numbers non-empty lines...
oh, that's just a man page lookup away. use 'nl -ba' which numbers all the lines. default style is '-bt' which numbers only non-empty ones, as you have experienced...
- jwilk 9y agoEven with -ba (which I could never remember), nl does too much magic: $ printf 'foo\n\:\nbar\n' | cat -n 1 foo 2 \: 3 bar $ printf 'foo\n\:\nbar\n' | nl -ba 1 foo bar