I want to search a text file for the existence of certain strings and execute a command if they exist, something along the lines of:
if <string> exists
command
or
if <any member of this list exists>
command
Any suggestions? I know how to manually search a file with grep, cat, etc., but the "if this exists" part eludes me.
if <string> exists
command
or
if <any member of this list exists>
command
Any suggestions? I know how to manually search a file with grep, cat, etc., but the "if this exists" part eludes me.