From: Dave Gibson on
R. Georgeson <rmg(a)> 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

If you have inotify-tools <> 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 &

wait $soffice_pid

Or from another shell:

while pgrep 'soffice' > /dev/null 2>&1 ; do sleep 5 ; done