我试图在 'sh -c' 命令字符串中定义一个变量:
sh -c "TMP=??; echo $TMP;"
什么都没打印。
为什么我不能在 'sh -c' 字符串中定义变量?
shell variable
shell ×1
variable ×1