News for hackers. Stuff that matters.
Re:Ruby One-Liners by masklinn on Saturday September 14, 2019 @07:34AM (#20970155)
It's from awk: the BEGIN and END patterns match the start and end of a file/stream being processed, while normal patterns are checked on each line (and no pattern matches every line).

This is very useful to script a setup -> for reach line -> summary of a file e.g. initialise a map in BEGIN, fill the map for each line, and print the map in END.

There are no comments on this comment yet.