Anyone know of a good resource to read up on shell scripting?
I'm working on a script that take a single argument and checks various files for the presence of that expression:
eg. ./script.sh filename
so far I have:
Code:
#!/bin/sh
check=$1
result=`cat /path/to/file/file1 | grep $1`
if ($result !="")
then
echo "$check found"
exit
fi
echo "$check not found"
it's not doing exactly what I want though, I've googled, but haven't come across anything definitive... any help appreciated
TIA