Can you use grep / awk on variables instead of files?
What I want to do is check if a pattern is found in a string variable. I'm clearly missing either a very useful command or something more even more fundamental, i.e, how to get a string variable to be piped into grep instead of a file name.
how can I check if $Y is part of $X
is this possible with grep / awk?