Posted on 09-24-2014 05:30 PM
There seems to a problem with Casper 9.4 (haven't checked 9.5) ...
Script parameter slots 10 & 11 are passed junk when populated or not
Test script as so:
#!/bin/bash
echo "$1"
echo "$2"
echo "$3"
echo "$4"
echo "$5"
echo "$6"
echo "$7"
echo "$8"
echo "$9"
echo "$10"
echo "$11"
exit 0
When executing via a policy with slots 10 & 11 populated or not, these slots are always passed the string
/0
/1
Example results:
Running script zzz_test_parameters...
Script exit code: 0
Script result:
/
SYDIPG-VMXTEST05
4
5
6
7
8
9
/0
/1
Anyone else seen this, or can someone test on 9.5?
Solved! Go to Solution.
Posted on 09-24-2014 06:48 PM
Not a bug, just bash. Enclose the parameters in curly braces, like "${10} and "${11}" I've had the same problem in the past. The shell just expands the '$1' in each parameter before it sees the whole variable, so you're left with the /0 and /1 for $10 and $11 respectively.
Posted on 09-24-2014 06:48 PM
Not a bug, just bash. Enclose the parameters in curly braces, like "${10} and "${11}" I've had the same problem in the past. The shell just expands the '$1' in each parameter before it sees the whole variable, so you're left with the /0 and /1 for $10 and $11 respectively.
Posted on 09-25-2014 04:07 PM
Yup! Of course that's what's happening. Thanks!!!!