188k views
2 votes
What is the output of the AWK program?

BEGIN {
a[1]="CST"
a[2]="CST"
for(i=1;i<4;i++) {
print a[i]
}
}

etc.

1 Answer

2 votes
Luckily your file uses YYYY-MM-SS HH:MM:SS timestamps, which sort alphabetically. Those can be compared with < > <= etc without worrying about any date math. MIN="..." and MAX="..." are where those values are input into awk.
User Joel Hoelting
by
5.9k points