BASH how can i get other scripts output, in the active dialog box?

480 Views Asked by At

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
1

There are 1 best solutions below

0
On BEST ANSWER

dialog has a --tailbox option (and also a --tailboxbg one) that does pretty much what you need.