But. Then I'd like to add/find one string more...
Quote:
{ FS="Jane " }
/123/ {print $2}
{ FS="Doe" }
/Doe2/ {print $2}
But it gives me only last result/print ?!?
My problem is namely one (even more) large file and at least twelve strings to find in it (them). I can manage this with twelve awk commands, but I'd like to add all into one awk command file.
And last, I'd like to put results into columns as:
- first string first column, second string second column,...
and
- first file first row, second file, second row,...
Many wishes...
---------- Post updated at 12:58 PM ---------- Previous update was at 09:48 AM ----------
I found it (silly me
).
Quote:
{ FS="Jane ||Doe" }
/123/ {print $2}
/Doe2/ {print $2}
First one ok. But second one: to put results into columns instead of one by one into rows, is still in question
.