#/bin/sh
echo "enter the user name"
read $username
echo "Enter new home directory"
read $newhd
usermod -d $newhd $username ;;
error while executing :
enter the user name
Rev
Enter new home directory:
/home/58745
usermod: option requires an argument -- 'd'
Try `usermod --help' or `usermod --usage' for more information.
If i try usermod -d /home/58745 Rev in the command line, it is wirking fine.. but in the script, it is displaying usermod: option requires an argument -- 'd' error.
Could anybody please help me out in this issue......