First of all, thank you so much for all the detailed explanation about AWK. I
cannot say I understood everything (I am used at writing in bash, and from
some scripts I have shared here in the Forum you will notice I am not as good
at making things simple and straightforward as you are), but your
instructions were certainly clear and well written out. I hope others will
benefit from reading it too.
Second, the first example is indeed what I needed (the result being 3). I run
that piece of code and was able to get the results I needed. The script is
also fast, which I was worried about given my files were very large. Works
great!
AWK seems very useful and I hope I will have the time to put into learning
it, right now it wasn't possible so I am deeply grateful for your help. Thank
you once again!