I've defined a variable to be substituted in BASH which looks like this
EXPORT_FLT_2="<ngc_filter_configuration><ngc_filters><ngc_filter>ngc_filter_operator operator='and'><ngc_filter_term type='ip' value='192.168.175.99'/><ngc_filter_term type='ip' value='72.32.127.138'/></ngc_filter_operator></ngc_filter></ngc_filters></ngc_filter_configuration>";
I now want to use this variable in my shell script which looks like
. /mnt/.kumara/automation/exportcli.cfg
${PA_HOME}/exportcli -v -1:-1:-1:-1 0x1A2B3C4D $TFA_TRACE_FILE $TFA_ip $TFA_ifn $TFA_ST $TFA_ET "$1" &> /dev/null
md5sum ${TFA_TRACE_FILE}1.cap | cut -d' ' -f1
rm ${TFA_TRACE_FILE}1.cap
All the variables being used except for "$1" are defined in the exportcli.cfg file Now after executing the script like
$./export.sh "$EXPORT_FLT_2"
Insted of the actual substitution of the variable I see no parameters being passed. Am I missing something here ?
sh -x? That will give you hints.-xI got the following result++ . /mnt/.kumara/automation/exportcli.cfg +++ TFA_ST=1312464957000...<all the remaining substitutions> +++ EXPORT_FLT_2='<ngc_filter_configuration><ngc_filters><ngc_filter><ngc_filter_operator operator='\''and'\''><ngc_filter_term type='\''ip'\'' value='\''192.168.175.99'\''/><ngc_filter_term type='\''ip'\'' value='\''72.32.127.138'\''/></ngc_filter_operator></ngc_filter></ngc_filters></ngc_filter_configuration>' ++ echoButecho $1results in a blank