Why does my shell script not find anything (find . -name script.sh | grep watermelon)

Posted by Chuck on Stack Overflow See other posts from Stack Overflow or by Chuck
Published on 2010-03-25T05:23:33Z Indexed on 2010/03/25 5:33 UTC
Read the original article Hit count: 158

Filed under:
|

I have a script that I'm running from the home directory to search for all files called "script.sh" that contain the string "watermelon". It's not finding anything but I can clearly see these scripts in the subdirectories. Could someone please suggest a change to the command I'm using:

find . -name script.sh | grep watermelon

© Stack Overflow or respective owner

Related posts about shell-scripting

Related posts about grep