我有一个使用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
答案 0 :(得分:2)
dialog
有一个--tailbox
选项(以及一个--tailboxbg
选项)可以满足您的需求。