BASH 如何在活动对话框中获取其他脚本输出?
我有一个使用 ncurses 的对话框窗口。但在该对话框窗口中我想显示我的 driver.sh 输出,我该怎么做?或者至少是完整或不完整的东西。
1) /tmp/main.sh
if [ "$output" = "1" ]; then
# here in this window the driver.sh ouput should show
dialog --msgbox "Here it should show the output of driver.sh" 10 100
configure=`/tmp/driver.sh`;
fi
2) /tmp/driver.sh
cd /tmp;
if [ ! -d "${pkgdirectory}/test" ]; then
cd ${pkgdirectory}
git clone git://code.test.com/git/test.git;
cd ${pkgdirectory}/test;
./autogen.sh;
make;
make install;
else
cd ${pkgdirectory}/test;
./autogen.sh;
make;
make install;
fi
I have a dialog window using ncurses. But in that dialog window i want to show my driver.sh outputs, how can i do that? Or at-least something like its complete or not complete.
1) /tmp/main.sh
if [ "$output" = "1" ]; then
# here in this window the driver.sh ouput should show
dialog --msgbox "Here it should show the output of driver.sh" 10 100
configure=`/tmp/driver.sh`;
fi
2) /tmp/driver.sh
cd /tmp;
if [ ! -d "${pkgdirectory}/test" ]; then
cd ${pkgdirectory}
git clone git://code.test.com/git/test.git;
cd ${pkgdirectory}/test;
./autogen.sh;
make;
make install;
else
cd ${pkgdirectory}/test;
./autogen.sh;
make;
make install;
fi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
dialog
有一个--tailbox
选项(还有一个--tailboxbg
选项),几乎可以满足您的需要。dialog
has a--tailbox
option (and also a--tailboxbg
one) that does pretty much what you need.