Not quite sure how to do this but I need to get the input from createdb, which is an Ingres command, and pass it to a variable in the wrapper script and then write to log file.
#!/usr/bin/bash
# createdb_wrapper.scr
# Log information about user of createdb.scr
#Install=`echo $II_SYSTEM`
#Default_Dir=$Install/ingres/DBA
#Database=`echo ingprenv II_DATABASE`
Default_Dir=/export/home/cwatts/test
Default_Log=DB.Audit
while [ -z "${fname}" ]
do
echo "Please, enter your Fullname [ENTER]:"
read fname
done
dbname=`bash createDB.scr | awk '{printf $1}'`
while [ -z "${desc}" ]
do
echo "Please,enter a brief Description [ENTER]:"
read desc
done
#Checks the directory exists, and creates if not
if [ ! -d $Default_Dir ] ;then
echo "directory doesn't exit, it will be created"
mkdir $Default_Dir
fi
echo `date` '|' $dbname '|' $fname '|' $desc >> $Default_Dir/$Default_Log
exit