我试图使用Bash脚本创建一个键值对的字典。我试着使用这个逻辑:
declare -d dictionary defaults write "$dictionary" key -string "$value"@H_301_2@…其中$ dictionary是一个变量,但这不工作。
有没有办法在Bash脚本中创建键值对?