environment:
AlmaLinux release 8.4 (Electric Cheetah)
Ubuntu 20.04.3 LTS
syntax:
$ cat -n list.txt
result:
$cat -n list.txt
1 root
2 daemon
3 bin
4 sys
5 sync
6 games
7 man
8 lp
9 mail
10 news
11 uucp
12 proxy
13 backup
14 list
$
$cat -n list1.txt
1 root
2 daemon
3 bin
4
5 sys
6 sync
7 games
8 man
9 lp
10
11 mail
12 news
13 uucp
14 proxy
15 backup
16 list
$
空白行にも行番号が付加される