I'm using below if statement to trigger sucess/failure email alert. But, && condition doesn't seems to be working as expected. Could someone assist whether below if statement is correct.
OUT_FILE=TEST_UPLOAD.csv
STRING=`grep 'party_id' $OUT_FILE`
if [ -f $OUT_FILE ] && [ -z $STRING ]; then
echo "File upload failed"
else
echo "File upload success"
fi