The code is:
src=/home/Desktop/src
dest=/home/Desktop/dest
if test -s $src/$InputFile ; then
echo "File is present. :$InputFile"
else
echo "File is not present"
fi
In the above code if I declare variable "InputFile" as InputFile=a.txt then it goes and check for a file a.txt in src directory, if file exists it prints "File is present". If file does not exists then it prints "File is not present".
I have not declared variable "InputFile" in above code. Still it goes to src path and execute if condition and prints "File is present". Can anyone tell me exact behaviour of "test -s" when filename variable is empty?