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
If you have inotify-tools <http://inotify-tools.sourceforge.net/> you
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
soffice -calc filename &
Or from another shell:
while pgrep 'soffice' > /dev/null 2>&1 ; do sleep 5 ; done