Hi
I am trying to execute a script from within another script - the script that should be executede is given as parameters.
ex.
parm_test.sh "[/home/nmsuser/scripts/Workflow.sh -=-CRM 2B - IVR-=-"
should execute this script and commands
/home/nmsuser/scripts/Workflow.sh "CRM 2B - IVR"|awk 'NF'
This is a very simplified version of the script that shows the problem
#!/bin/ksh
#the following gsub -=- with " and =-= with '
TestCase=`echo $1|awk -F "[" '{print $2}'|awk -F "]" '{print $1}'|awk '{gsub("-=-","\"",$0); print }'|awk '{gsub("=-=","\047",$0); print }'`
echo $TestCase
chk=`$TestCase`
echo $chk
#end
the echo works and looks fine - I can se that the gsub worked - it echo's
/home/nmsuser/scripts/Workflow.sh "CRM 2B - IVR"|awk 'NF'
whitch is excacly what I want executede - and it I hard code it into the script it works fine.
I am trying to execute a script from within another script - the script that should be executede is given as parameters.
ex.
parm_test.sh "[/home/nmsuser/scripts/Workflow.sh -=-CRM 2B - IVR-=-"
should execute this script and commands
/home/nmsuser/scripts/Workflow.sh "CRM 2B - IVR"|awk 'NF'
This is a very simplified version of the script that shows the problem
#!/bin/ksh
#the following gsub -=- with " and =-= with '
TestCase=`echo $1|awk -F "[" '{print $2}'|awk -F "]" '{print $1}'|awk '{gsub("-=-","\"",$0); print }'|awk '{gsub("=-=","\047",$0); print }'`
echo $TestCase
chk=`$TestCase`
echo $chk
#end
the echo works and looks fine - I can se that the gsub worked - it echo's
/home/nmsuser/scripts/Workflow.sh "CRM 2B - IVR"|awk 'NF'
whitch is excacly what I want executede - and it I hard code it into the script it works fine.