Originally Posted by gizza23
However I can ls the directory and see that it is there. I can cat the file manually. I can even run the grep command MANUALLY and it will run. Anyone have any clues as to why this may not work?
I suspect you're not executing the grep command manually exactly as it is in the script. That is, I suspect you're typing what's between the quotes in that line, rather than the whole line. You're getting the results you're getting because the problem lies outside of the quotes.
First of all, you don't use '$' when you are assigning variables, only when accessing.
variable="this is a variable"
Second of all, in order to execute a command within another command, you have to use backticks.
variable=`grep pattern file`
That's what I see off the bat.. hope that helps!