awk中NR和FNR的区别

NR  The total number of input records seen so far.

FNR The input record number in the current input file.


简单翻译:

NR  表示读到的文件行数

FNR 表示读到的当前文件行数


wKiom1OpPeayF0W2AALR6EJZxpI592.jpg

本文出自 “linuxsed” 博客,转载请与作者联系!

你可能感兴趣的:(shell,awk,FNR,NR)