Kindly help on below script:
<<
i='find ...'
if [ -f $i ] then
echo 'File Exists'
else
echo 'File Does Not Exist'
>>
If i has some file name then it runs properly but if i has nothing ( blank value) then it throws an error. I dont exactly remember right now but error seems like: "test:..parameter..."
To me it looks like if variablei does not have any file name if statements gets fail.
Could you please suggest me the right way to check if i has some file name and existence of file.
Thanks in advance