Monday, March 30, 2009

script for creating soft link for all Custom concurrent programs on target system after cloning

This code snippet helps to create all the soft link for custom concurrent program after clone on a target system.
Prerequisites
=============
Script is invoked from applmgr user account.
Shell Script for soft link creation on target system after cloning.
===================================================================
#!/usr/bin/ksh
doc()
{
cat <<-EOF
# Usage create_soft_link.sh
#
# Used for target System after cloning to take care of soft link
# for all the custom program to the executable $FND_TOP/bin/fndcpesr
#
#----------------------------------------------------------------
# Procedure :
# Should be run manually
# ---------------------------------------------------------------
# Dependencies :
# NO
# Change history :
# ---------------------------------------------------------------
#
EOF
}
#=====================================
# For displaying help and usuage
#=====================================

while getopts h OPT
do
case $OPT in
h) doc
exit 0;;
\?) echo "Usage : $0 "
exit -1;;
esac
done
shift `expr $OPTIND - 1`
#=====================================
# Check for APPL_TOP
#=====================================

if [ t${APPL_TOP} = "t" ]
then echo "Appl Top is not set, Set the appltop and run it again"
exit 0;
fi

cd $APPL_TOP
#=====================================
# Code for soft link creation
#=====================================

for prgName in `ls */11.5.0/bin/*prog`
do
echo "Creating link for - $prgName"
rm `echo $prgName sed 's/\.prog//'`
ln -s $FND_TOP/bin/fndcpesr `echo $prgName sed 's/\.prog//'`
echo "\t\t\t.......created for $prgName"
done

1 comment:

Unknown said...

oh, have you heard about the service of recover corrupt sql server 2005? it is the fastest way to open not accessible files