我有一个简单的脚本,但由于某种原因,将命令作为变量运行时它会失败。关于为什么的任何想法?(我正在尝试使用脚本更改 pipewire 的设备设置)
cmd2="pactl set-card-profile 'bluez_card.B8_F8_BE_79_40_C0' 'headset-head-unit-msbc'"
$cmd2
#Command above Fails with "Failure: No such entity"
pactl set-card-profile 'bluez_card.B8_F8_BE_79_40_C0' 'headset-head-unit-msbc'
#command above works fine. (if I modify the bluez to blue99 it fails as cmd2 did)