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.
我有一个在这里制作 GUI 列表的脚本:
zenity --list --text="Choose action" --column= --hide-header opt1 opt2 opt3
如何将此输出分配给变量?
OUT=$(zenity --list --text="Choose action" --column= --hide-header opt1 opt2 opt3)
这会将输出分配给$OUT.
$OUT
$()操作员执行命令替换,即允许命令的输出替换命令本身。
$()