Thanks a lot
cfajohnson,
you rule
But now I have another question
I've got my attributes evaluated, however I need to consider if multiple attributes are passed through, as a single string
Basically, I need to tokenize the
parameters string
This is what I have so far:
Code:
...
evalParams()
{
output=""
input="$1"
set -A attr $(echo ${input} | tr ',' ' ' )
n="0"
while [ "${n}" -lt "${#attr[*]}" ];
do
eval "p=${attr[${n}]}"
output="${output} ${p}"
n=`expr $n + 1`
done
echo ${output}
}
...
## this is actually loaded from file, but for the purpose of an example it's fine :)
parameters="`date +%m%d`,`date +%H%M`"
...
params=`evalParams ${parameters}`