I have a script like this:
It executes correctly but the question is:sync
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
if test $? -eq 0
then echo OK
else echo ERROR!! error code = $?
echo install completed
after a shell command inside the script i can test its correct execution by testing $?
but how to do it after each single command i give to ftp??
Please help me!!
I tested the fact that if a single ftp command fails $? at the end doesn't tell it (it is 0)