40
by Arnold D. Robbins
Bring latest byte code gawk into git. Hurray! |
1 |
BEGINFILE { |
2 |
print "In BEGINFILE:" |
|
3 |
filename = FILENAME |
|
4 |
gsub(/.*[/]/, "", filename) |
|
5 |
printf "\tFILENAME = %s, FNR = %d, ERRNO = \"%s\"\n", filename, FNR, ERRNO |
|
6 |
||
7 |
if (ERRNO != "") |
|
8 |
nextfile
|
|
9 |
}
|
|
10 |
||
11 |
FNR == 1 { print "processing", filename } |
|
12 |
FNR > 1 { nextfile } |
|
13 |
||
14 |
ENDFILE { |
|
15 |
print "In ENDFILE:" |
|
16 |
filename = FILENAME |
|
17 |
gsub(/.*[/]/, "", filename) |
|
18 |
printf "\tFILENAME = %s, FNR = %d, ERRNO = \"%s\"\n", filename, FNR, ERRNO |
|
19 |
}
|