On Wed, Jan 05, 2011 at 02:27:39AM -0800, S Mathias wrote:
> $ echo ${PWD##*/}
> somefolder
> $ if "${PWD##*/}" -eq "asdf" > /dev/null; then echo "this is the asdf folder"; else exit 1; fi
if [ "${PWD##*/}" == "asdf" ]; then echo "this is the asdf folder"; else exit 1; fi
Why not simple use:
if [ -e $SCRIPT ]; then
echo "File exists";
else
echo "File does not exist";
fi
Regards,
Didar