#!/bin/bash
if [ -d "$1" ]
  then
    echo "$1 is directory.existed"
  else
    echo "$1 does not exist, now create it"
    mkdir -p $1
         if [ "$?" -eq 0 ]
         then
             echo "$1 is created"
         else
             echo "$1 create failure"
         fi
fi