We want to search the following line recursive under folder/s
awk '{print}'|grep -i -e 'port is up' -e 'valid output'
so we did that:
grep -r "awk '{print}'|grep -i -e 'port is up' -e 'valid output'" /var
grep -r "awk '{print}'|grep -i -e 'port is up' -e 'valid output'" /etc
grep -r "awk '{print}'|grep -i -e 'port is up' -e 'valid output'" /opt
but I am not sure if grep can managed the " ' " and "{" characters or maybe my syntax is wrong?
awkprogram you're searching for? It's just passing on its input... Ah well, you want the-Foption forgrepto search for a fixed string, and possibly-xto force a whole line match. Whatgrepimplementation are you using? GNUgrepI presume?