我设置了一个包含空格的环境变量。我可以正确输出。
export dpath="/path/with/spaces/is here/clear"
echo $dpath
/path/with/spaces/is here/clear
现在在这里使用环境变量:
sshpass -p 'xxxx' sftp -q -a -P22 -r "account@12.34.56.78:${dpath}" .
File "/path/with/spaces/is" not found.
现在空间被忽略(并拆分)。我怎样才能解决这个问题?