$ cat employee.txt
1 director 2 30000
2 manager 4 20000
3 engineer 8 9000
4 technician 20 4500[/qutoe]
第 2 个文件共
[quote]$ cat employee.txt
1 director 2 30000
2 manager 4 20000
3 engineer 8 9000
4 technician 20 4500
$ awk '{print FILENAME, NR, FNR}' tmp.txt employee.txt
tmp.txt 1 1
tmp.txt 2 2
tmp.txt 3 3
tmp.txt 4 4
tmp.txt 5 5
tmp.txt 6 6
tmp.txt 7 7
tmp.txt 8 8
employee.txt 9 1
employee.txt 10 2
employee.txt 11 3
employee.txt 12 4
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |