Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
请告诉我如何使用 tcsh 命令解决 Missing } 错误消息。
%set aaa = {123 456} Missing }. %set aaa = '{123 456}' echo $aaa Missing }.
如果要设置$aaa为 string "{123 456}",则需要在值周围加上单引号或双引号,就像在第二个set命令中一样。
$aaa
"{123 456}"
set
当你这样做echo $aaa,它会扩展为您分配给它的值,然后扩展大括号(有关大括号扩展的信息,请参阅 csh/tcsh 文档)。为避免大括号扩展,请添加双引号:
echo $aaa
echo "$aaa"
或使用:q限定符:
:q
echo $aaa:q
添加逗号:
set aaa = {123,456}