Really bad solutions!
The objectives are:
- Use only bash (
>=4
acceptable for access to associative arrays) and if necessary common gnu coreutils awk
is no longer allowed (though I did use it initially to sum lines)- Performance is not a goal
- Learn something