Is it possible to assign a variable to an existing variable as you can do in a typical linux environment? An example with balenaSound would be setting SOUND_DEVICE_NAME to BALENA_DEVICE_NAME_AT_INIT.
No, it is not possible to assign a variable to an existing variable. On balenaCloud, values assigned to variables are not interpreted (as it happens for exampe in the case of a shell prompt in Linux). They are treated as strings and stored as is.
A work-around I can think of is to perform the indirection in your application code. That is (for example) store
'_$_BALENA_DEVICE_NAME_AT_INIT' as the value of the SOUND_DEVICE_NAME balenaCloud variable. In application code, if a variable’s value is found to start with
'_$_' then application code fetches the value of the string that follows i.e ‘BALENA_DEVICE_NAME_AT_INIT’ in this case.
Hope that helps.
Thanks and regards,