I have the following setup:
NODEX="sn1"
varname="${NODEX}_payTimestamp"
echo "${!varname}"
> sn1_payTimestamp
How can I set a value to the variable “sn1_payTimestamp”?
Something like that?
${!varname}=$(date --utc +%Y%m%d_%H%M%SZ);
Thx in advance
Update
associative arrays seem to be the best solution. Is there a good way to store them into and read them from a text file? This is why I intended to use that “variable variable names”.