I am writing a shell script, and need to include some validation. My validation is checking the backup folder exists, with the correct number of files present inside it.
For example, if the backup ran successfully then there would be 23 files in the backup folder, and we can continue. I am having some problems with my script - can anyone see any my script does not work?
if [ 'ls -1 | wc -l' == 23 ]
then
echo -e "\n Matching! \n"
else
echo -e "\n Something has gone wrong!\n"
fi