使用Pashua与bash

时间:2017-09-04 16:44:19

标签: bash

我在OSX中使用带有Pashua的bash脚本来创建GUI弹出窗口

PASH="/Applications/Pashua.app/Contents/MacOS/Pashua"
CONF="/Users/user1/desktop/pashconf.pash"
$PASH $CONF

配置文件是:

tb.type = textbox
tb.default = Line 1[return]Line 2[return]Line 3
tb.width = 300
tb.height = 60
tx.type = textfield
tx.label = Example textfield
tx.default = Textfield content
tx.width = 310

输出:

tx=Textfield content
tb=Line 1[return]Line 2[return]Line 3
tx=Textfield content
tb=Line 1[return]Line 2[return]Line 3

但是我想将输出中的所有变量和数组用作bash变量。这样做的最佳方法是什么?

此外 - 是否可以将配置代码放在bash脚本中?

非常感谢

1 个答案:

答案 0 :(得分:2)

这应该可以解决问题。它将单个返回值存储为变量,并在脚本中包含conf信息。

cat_name