Techiee Techiee - 7 months ago 27
Linux Question

What does awk '/a/ {print $4 "\t" $3} abc.txt mean?

I am learning awk and I was confused with the following command:

awk '/a/ {print $4 "\t" $3}' abc.txt

What does
mean? I was reading the Sed & awk, 2nd Edition by Dale Dougherty. Probably, I didn't reach that part of
text processing part. Hence asked this question.


for every line in the abc.txt file it test if it has a "a" character. If it does prints the fourth word in that line, then a tab character and then the third word.