Code: Select all
diff file1 file2; if [ $? == 0 ] then echo "Counts in sync" else exit -1 fi
SH: Syntax error at Line 1 : `if' is not matched.
My search in the forum did not fetch any specific solution. Apprecite your help!
Moderators: chulett, rschirm, roy
Code: Select all
diff file1 file2; if [ $? == 0 ] then echo "Counts in sync" else exit -1 fi
Code: Select all
diff file1 file2; if \[ $? == 0 \] then echo "Counts in sync" else exit -1 fi
Code: Select all
#!/usr/bin/ksh
diff file1 file2
if \[ $? == 0 \]; then
echo "Counts in sync"
else
exit -1
fi
Code: Select all
Syntax error at Line 1 : 'Then is not expected'