can you run mkdir
in your login session?
If you can, most probably the problem is caused by PATH in your script, try suing full path:
if [ ! -e $c ];
then
/bin/mkdir -p "$c"
fi
or export PATH first
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
export PATH
if [ ! -e $c ];
then
/bin/mkdir -p "$c"
fi