$ cat tmp.txt
hello world
hello linux
hello perl
good perler
best linuxer
strong unixer
weak windower
[beyes@beyes command]$ perl -p -e '$_ = "$. - $_"' <tmp.txt
1 - hello world
2 - hello linux
3 - hello perl
4 - good perler
5 - best linuxer
6 - strong unixer
7 - weak windower
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |