Re: bash script using dialog



On 1/30/06, Tim Frost <timfrost@xxxxxxxxxx> wrote:
> On Mon, 2006-01-30 at 16:52 +0000, Thomas Beckett wrote:
> > I have created a script that I use when installing on new machines
> > that automatically copy over settings files from CD to their correct
> > place. This is done using dialog. I now want the script to show the
> > output of a compilation. I have tried:
> >
> > dialog --backtitle "Compiling klips program" --tailbox $OUTPUT 15 45
> > cd /tmp/openswan* ; make programs >> $OUTPUT
> >
> > where $OUTPUT is a previously created file.
>
> try changing the order:
>
>
> # start the compile in background in its own subshell
> (cd /tmp/openswan* ; make programs >> $OUTPUT &)
> dialog --backtitle "Compiling klips program" --tailbox $OUTPUT 15 45
>
>
> the parentheses mean that the cd affects the make command, and *not* the
> dialog and the rest of the script.
>
>
> The '&' on the first line puts the make into the background, allowing
> the script (and hence the dialog command) to continue.
> >

Thanks very much Tim, that was just the ticket! Unfortunately I now
realise that the tailbox may not be what I need. I want the script to
start the compilation but carry on when it is finished whithout the
user having to press <Exit>. Do you have any suggestions how I can
compile the program and inform the user that this is happening (either
through showing the compiler output or not - they dont need to see the
output as they wont understand it anyway, it was just a way i thought
of so they dont think it has stalled) but then carry on with the
script to bring up the next box afterwards.
I have attached my script so far in case others find it useful (and so
you know im not just freeloading and getting others to do it ;) )

Tom

Attachment:Copy-Settings.sh
Description: Bourne shell script

-- 
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Relevant Pages

  • bash script using dialog
    ... I have created a script that I use when installing on new machines ... that automatically copy over settings files from CD to their correct ... and start the compilation, then showing the text in the box but all I ... get is the blue background of dialog and no text box at all. ...
    (Ubuntu)
  • Re: [PHP] How does the Zend engine behave?
    ... all include files compiled when the script is first compiled, which would mean a cascade through all statically linked include files. ... I.e Are statically included files automatically loaded into memory at the start of a request? ... I assume the eaten memory is for something to do with compilation or caching in the ZE. ... Now suppose a second request arrives for the same script, from a different requester, am I right in assuming that the uncompiled form is loaded? ...
    (php.general)
  • Re: [PHP] How does the Zend engine behave?
    ... all include files compiled when the script is first compiled, which would mean a cascade through all statically linked include files. ... I.e Are statically included files automatically loaded into memory at the start of a request? ... I assume the eaten memory is for something to do with compilation or caching in the ZE. ... Now suppose a second request arrives for the same script, from a different requester, am I right in assuming that the uncompiled form is loaded? ...
    (php.general)
  • Re: [PHP] How does the Zend engine behave?
    ... into memory at the start of a request? ... Or when the script is initially loaded? ... assume the eaten memory is for something to do with compilation or ... Now suppose a second request ...
    (php.general)
  • Re: What should I do with std.textio.all of ModelSim
    ... I don't use the Modelsim GUI for compilation because ... My point was, that if you write a script, you are in control. ... It is a good idea to clean out the work directory ...
    (comp.arch.fpga)