awk is very good for this sort of thing. If you were an experienced programmer, I'd say definitely go for that, you can pick up all you need in a couple of hours from the man page.
Since you say you're a novice I'm not sure how hard it would be; python is designed to be easy for novices to pick up, so you might want to start there. Bash syntax is quite disgusting IMO, although still worth knowing if you use Linux a lot. I'm slowly getting used to it I guess.
Anyway, to get you started, this command will go through all files in the current directory and print the 2nd and 3rd words of any line containing the text "THIS-LINE" (with words separated by spaces):
Code:
awk '/THIS-LINE/ {print $2, $3}' *
Alternatively, this command will print the 2nd and 3rd words of the 5th and 6th lines of each file:
Code:
awk '{if (FNR==5 || FNR==6) print $2, $3}' *
It sounds like that's along the lines of what you want. You can find awk tutorials online, and the manpage is good. The syntax of awk programs is much like C or Java, so looking at sample programs in those languages might help if you're stuck on how to write a complex
if statement, or a
for loop. Hope that helps!
Edit to add: once you've got the output in the format you want, redirect it to a file or pipe it to another program - the tutorials you've been looking at will tell you how