Dear All,
I have script.
Dest=""
IFS='
'
for translation in $(echo $MY_MAP)
do
t1=$(echo $translation | cut -d"=" -f1)
t2=$(echo $translation | cut -d"=" -f2| cut -d"," -f1)
if [ $u_testname = $t1 ]
then
Dest=$UNX/$u_product_path/$u_study_path/$UNXTR/$t2
break;
fi
done
if [ "x$Dest" = "x" ];
then
Dest=$UNX/$u_product_path/$u_study_path/$UNXTR/$MAP_OTHER
fi
if [ ! -d $Dest ]
then
mkdir -p $Dest
fi
echo "printing Filename:" $n_filezip_name "Destination :" $Dest/$l_filezip_name
echo "Current Working Directory:"
echo cp -f $n_filezip_name $Dest/$l_filezip_name
pwd
cp -f $n_filezip_name $Dest/$l_filezip_name - This is not working
echo $?
if [ $? -ne 0 ]
then
echo "$DATE [OCEDL ERROR] Not able to cp long_unix_name to $Dest"
fi
IFS='
'
}
When i run this it produces
echo $? as 0
But if I run this from shell it does what it should do. Any Guess what is wrong I consider IFS is culprit but not able to debug it.
cp -f $n_filezip_name $Dest/$l_filezip_name
this is not working.
Any help or advise would be great help to me.
Thanks.