i want to check if the file is in the directory or not, and also it should be handle error conditions, like missing files and report the error and exit.
i did something like this:
file ="hello"
if !test -e "${file}"
then echo "No such files exist!"
exit 1
else
do something.......
fi
but is not working, can anyone please help? (using bourne shell script)
and also can we check for more than 1 file, like check for hello, hello1 and hello2, that are these files exist in the directory?