I get an error when using "dconf write" to value a key with a [] list from a bash shell script
The script below works as expected :
#!/bin/bash
echo "dconf write <PATH> \"['val1','val2']\""
dconf write <PATH> "['val1','val2']"
dconf read <PATH>
echo OK
The script below fails with "error: 0-9:unterminated string constant"
#!/bin/bash
list="\"['val1','val2']\""
echo dconf write <PATH> $list
dconf write <PATH> $list #fail
dconf read <PATH>
echo NOK
any idea ?