On 2-Dec-2004, Mike Miller <address@hidden> wrote:
| On Thu, 2 Dec 2004, Thorsten Meyer wrote:
|
| >> It is possible to put an 'if' statement in your script to have it
| >> either "sleep(1)" or execute the awk code depending on the existence of
| >> a file or the existence of an ending element in a file tail.
| >
| > You are right. I could have octave wait for the existence of the file.
| > But as soon as it exists, I would have to keep parsing it in a loop in
| > order to see if it is complete.
|
| But can't you then use my second suggestion and look at the file tail for
| a string? For example, maybe this command...
|
| tail -1 file.eps
|
| ...always returns this string...
|
| %%EOF
|
| ...when the gnuplot process has completed. The details of how this would
| be done depend on your shell.
If you just want to postprocess, then why not write your awk script as
a filter, then do something like
gset output "| awk -f myscript.awk > foo.eps"
Does that work? To get the output flushed to the pipe, you may have
to issue another "gset output" command or use closeplot.
jwe