I want to check if the three files that were created are empty or not using AND operator.
#!/bin/bash
FILE_1="/root/Desktop/file1"
FILE_2="/root/Desktop/file2"
FILE_3="/root/Desktop/file3"
if [[ -f "${FILE_1}" && -f "${FILE_2}" && -f "${FILE_3}" ]]; then
echo "All files are not empty"
else
echo "All files are empty"
fi
But I not getting an expected output. What will be the correct syntax to use AND operator in if-else statement?