Troubleshooting
Problem
Variable in the braces are considered as a string.
Cause
Passing the variable in the braces will be considered as a string. For example, $KerberosConfFileName and other variables in the following example will be considered as string and will not be substituted by the actual value.
$AdminTask createKrbConfigFile {-krbPath $KerberosConfFileName -realm $KerberosRealm -kdcHost $KDCHost -dns $DNS -keytabPath $KeytabPath }
All the variables inside the braces will be considered as string and will not substitute the actual value of the variable.
Resolving The Problem
In the above example the variable is used inside the braces {}. In Jacl , braces { } will group the contents and parse it as a SINGLE string, so it will not attempt to resolve the variables in it.
In order to resolve the variable in the above command, either "subst" or "list" command should be used.
"subst" will resolve the variables in the string and "list" will resolve the variables and group the contents as a single string.
Here are the modified samples.
Using subst
$AdminTask createKrbConfigFile [subst {-krbPath $KerberosConfFileName -realm $KerberosRealm -kdcHost $KDCHost -dns $DNS -keytabPath $KeytabPath }]
Using list
$AdminTask createKrbConfigFile [list -krbPath $KerberosConfFileName -realm $KerberosRealm -kdcHost $KDCHost -dns $DNS -keytabPath $KeytabPath]
Historical Number
72447;057;649
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21254555