awk keep if line contains “ example ”
问题 okay so I wish to keep lines containing several keywords, example of list: Name:email:username #registered Name2:email2:username2 Name3:email3:username3 #registered #subscribed #phonever Name4:email4:username4 #unconfirmed What I want to do is extract lines if they contain " #registered, #subscribed, #phonever example of output I want, Name:email:username #registered Name3:email3:username3 #registered #subscribed #phonever 回答1: With awk (use regex alternation operator, | , on a list of fixed