1450833603#!/bin/bash D="/home/ss/ss" if [ ! -d $D ];then echo "The directory does exist" echo -n "create it now [y/n]" read ANS if [ "$ANS" = "y" ] || [ "$ANS" = "Y" ];then echo "creating now" mkdir -p $D >/dev/null 2>&1 if [ $? -ne 0 ];then echo "Errors creating the directory" exit 1 fi fi fi