qse/ase/cmd/awk/t18.awk
2008-03-21 03:49:53 +00:00

22 lines
335 B
Awk

BEGIN {
print "0. FILENAME=", FILENAME, "FNR=", FNR;
}
/hello/ {
print "1. FILENAME=", FILENAME, "FNR=", FNR;
print "[" $0 "]";
#nextfile;
print "----------------";
}
/hello/ {
print "2. FILENAME=", FILENAME, "FNR=", FNR;
print "[" $0 "]";
nextfile;
print "----------------";
}
END {
print "== END OF PROGRAM ==";
}