# mkShScr.sh    20120119    jim@well.com    james stockford 

# this script makes a shell script stub 


echo -e "\n\nthis is $0 running \n\n" 


# ---------Get information for the new shell script---------

OK=wacky 
while [ $OK != y ] 
do 
    echo -e "\n\n Enter the name of the new shell script : " 
    read SSNAME 
    echo -e "You entered $SSNAME -- is that correct? " 
    read OK 
done 

OK=wacky 
while [ $OK != y ] 
do 
    echo -e "\n\n Enter a one line description : " 
    read DESCRIPTION 
    echo -e "You Entered \n $DESCRIPTION \n is that correct? " 
    read OK 
done 


# ---------Make the new shell script---------

echo "# $SSNAME    `date +%Y%m%d`   jim@well.com    james stockford" > ./$SSNAME 
echo -e "\n\n# $DESCRIPTION" >> ./$SSNAME 
echo -e "\n\necho \"This is \$0 running \n\n\" " >> ./$SSNAME 
chmod 711 ./$SSNAME 
echo -e "\n\n\n" 
./$SSNAME 
echo -e "\n\n seems right? \n\n" 
read 
vi ./$SSNAME 


# ---------Done making the new shell script---------
echo -e "\n\n\n\nBye Bye from $0 \n\n"