I am new to Daniweb and I need some help with my programming code in Unix.
I have written an if-else statement for Bash Scripting and it doesn't work. I have been told that variables would help with my code but I still don't see my program working.
I'm suppose to use a script that will check if it exists and if not, a termination message appears.
I did this:
if [ -e $x ]
then
echo "file exists"
else
echo "file doesn't exists"