cat -n
para quem odeia gatos:
-
Com o GNU
sed
:sed = file.txt | sed 'N;s/\n/\t/' | tail
-
com
awk
:awk '{ $0 = NR "\t" $0 } 1' file.txt | tail
-
Com
grep
e GNUsed
:grep -n ^ file.txt | sed 's/:/\t/' | tail
-
com
perl
:perl -lpe '$_ = qq($.\t$_)' | tail
ou
perl -pe 'print "$.\t"' file.txt | tail
-
Com
bash
,paste
eseq
:paste <(seq 1 $(wc -l <file.txt)) file.txt | tail
-
com
pr
:pr -n -t -l 1 file.txt | tail
-
Com% normal
sh
:let cnt=0 while read -r line; do let cnt\+\+ printf '%d\t%s\n' $cnt "$line" done <file.txt | tail
-
com
vim
::%s/^/\=line('.')."\t"/ | $-10,$y | new | P