using awk with column value conditions
Solution 1:
If you're looking for a particular string, put quotes around it:
awk '$1 == "findtext" {print $3}'
Otherwise, awk will assume it's a variable name.
Solution 2:
This method uses regexp, it should work:
awk '$2 ~ /findtext/ {print $3}' <infile>
Solution 3:
Depending on the AWK
implementation are you using ==
is ok or not.
Have you tried ~
?. For example, if you want $1 to be "hello":
awk '$1 ~ /^hello$/{ print $3; }' <infile>
^
means $1 start, and $
is $1 end.