I know this is simple, but I am rusty with my ksh scripting. I have a script that is doing an ftp to a mainframe and deleting a file. I have a grep statement in the script to look at the logfile. If there's an error in the log, I want the script to exit with an error. I can't make this work. It will exit, but without an error. I have tried it all sorts of ways. Here's the end of the script with one of my tries. Help!
rcTest='grep -i fails logfile'
if [[ ${?} = 0 ]] then
err=1
fi
rcTest='grep -i fails logfile'
if [[ ${?} = 0 ]] then
err=1
fi