Hi guys, I've been googling it for several hours now. However, I'm unfortunate enough to find the answer I've been looking for.
This is my problem,
awk '/foo/{count++;if(count=1){sub("foo","foo1")}}1' file.txt
I can find the mean of the number 1 after the {action}, I just want to know...