dialog 将结果写入变量文件名有提示

我使用

dialog --inputbox "input something" $(stty size) "" --clear 2>temp_file

这条指令非常正常,没有多余的提示,但是我用

temp_file="$(mktemp)"
dialog --inputbox "input something" $(stty size) "" --clear 2>"${temp_file}"

就是将后面换成了数值为文件路径的变量就会有一个

Expected a box option.
Use --help to list options.

这样的提示(不能算报错因为功能是可以实现的)
这是为什么?我的用法有问题吗?

dialog 版本: 20230209

我有。

是第一条指令 2>temp_file 这条吗?

是啊。

那就很奇怪了,版本也是一样的吗?
Version: 1.3-20230209

我的是 1.3_20250116。

好吧,现在我换用 whiptail 了,没有这个问题了

错误的原因是后面的 --clear 参数,删掉就行了