The following script used to check the specified file present or not in shell script
file exixts or not on particular location #########################################################################################
#!/bin/bash
#########################################################################################
# This Shell script used to find the specificed
filePath="/home/file-path"
fileName="$filePath/filename.txt"
if [ -f "$fileName" ]
then
echo "$fileName found"
else
echo "$fileName not found"
fi
To check multiple file on same if condtion
filePath="/home/file-path"
fileName="$filePath/filename.txt"
fileName2="$filePath/filename2.txt"
if [ -f "$fileName" ] && [ -f "$fileName2" ]
then
echo "$fileName found"
else
echo "$fileName not found"
fi