Prev: And now the Broadcom rant
Next: Benq Scanner S2W 4300U
From: Dave Gibson on 30 Jan 2010 16:03 R. Georgeson <rmg(a)nospam.zen.uk> wrote: > Is there a better way of waiting for OOo to close than - > > The sheet that gets loaded initially has a startup macro to create > <runfile> and a close macro to delete it > > Shell script goes > > while [ -e runfile ] do > sleep 10 > > which feels horribly clonky to me. Fairly straightforward use of a semaphore file. If you have procmail installed see the lockfile manpage. Maybe create the lock file under /var/lock/. If you have inotify-tools <http://inotify-tools.sourceforge.net/> you could do: inotifywait -e delete runfile > > I tried > > soffice -calc <filename> ; > > but that only waits till OOo finishes loading. Is that ';' a typo for '&'? If you want to wait in the same shell (or script) from which soffice is launched: soffice -calc filename & soffice_pid=$! wait $soffice_pid Or from another shell: while pgrep 'soffice' > /dev/null 2>&1 ; do sleep 5 ; done
|
Pages: 1 Prev: And now the Broadcom rant Next: Benq Scanner S2W 4300U |