Im pretty new to shell scripting, but i have got the jist of it over the past 10 weeks or so i have been using it. I just have one thing im stuck on thats bugging the hell out of me. Here it goes...
I need a script that -
You enter a filename and then a string which reports whether that string is present or not?
So for example, i need to enter a filename such as "testfile1" then i need to enter a string such as "hey" and it will report back to me whether the string is in the file.
I've searched high and low for a script that actually works but to no avail :(. Any help will be greatly appreciated.
Have a read of the manual page for grep as a starting point. if you don't have them on your PI, there are on this site too, although there may be some variations. Look under the "Man Pages" link at the top of this page.