A very simple question, which a found no answer to. How do I print out a specific field in awk?
awk '/word1/', will print out the whole sentence, when I need just a word1. Or I need a chain of patterns (word1 + word2) to be printed out only from a text.
Well if the pattern is a single word (which you want to print and can’t contaion
FS(input field separator)) why not:If your pattern is a regex:
If your pattern must be checked in every single field:
Modify any of the above to your taste.