qse/ase/test/awk/t18.awk

22 lines
335 B
Awk
Raw Normal View History

2006-10-17 09:36:09 +00:00
BEGIN {
print "0. FILENAME=", FILENAME, "FNR=", FNR;
}
2006-10-16 14:39:21 +00:00
/hello/ {
2006-10-17 09:36:09 +00:00
print "1. FILENAME=", FILENAME, "FNR=", FNR;
print "[" $0 "]";
2006-10-16 14:39:21 +00:00
#nextfile;
2006-07-28 10:38:16 +00:00
print "----------------";
}
2006-10-16 14:39:21 +00:00
/hello/ {
2006-10-17 09:36:09 +00:00
print "2. FILENAME=", FILENAME, "FNR=", FNR;
print "[" $0 "]";
2006-07-28 10:38:16 +00:00
nextfile;
print "----------------";
}
2006-10-16 14:39:21 +00:00
END {
2006-07-28 10:38:16 +00:00
print "== END OF PROGRAM ==";
}