filename.awk

来自「awk scripts awk scripts awk scripts awk 」· AWK 代码 · 共 17 行

AWK
17
字号
# Date: 06-03-90  19:07
# From: Herb Martin
# To:   Rob Duff
# Subj: comparison:sample

FNR < 3 {
  # the output ALWAYS claims the filenames are equal AFTER the first
  # file, even though the strings printed are DIFFERENT
 
  printf("FNR %d: [%14s]-[%14s]  ", FNR, lastfile, FILENAME) ;
  if (lastfile != FILENAME) print "they are NOT equal"
  else                      print "they are equal"
  lastfile = FILENAME
}
 
FNR == 3 { print "" }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?