I am trying to select some strings with awk but i am not getting exactly what i want
the data i have is in a column like this
name1 condition1
name2 condition2/condition1
name3 CONDITION3
name4 condition1/condition4
name5 CND1
name6 condition6
name7 cnd1
name8 condition3/cnd1
name9 CND1/condition2
I am trying to pick condition1 and cnd1 regardless its position and case of the letters.
I want the output to be like (condition1 and cnd1 in combination with anything)
name2 condition2/condition1
name4 condition1/condition4
name8 condition3/cnd1
name9 CND1/condition2
and another output to look like (condition1 and cnd1 ALONE)
name1 condition1
name5 CND1
name7 cnd1
I am using this command
awk 'BEGIN{IGNORECASE=1} $2 ~ /^cnd1$/ || /^condition1$/' directory/file.tab
this command is eliminating all the combinations.
How do I form the right command for this?