# Detect EOF and print all except that last line:
while [ -z "$(tail -1 sigusr2.out | grep ^EOF)" ]; do sleep 0.1; done
head --lines=-1 `pwd`/sigusr2.out
# Detect EOF and print all except that last line:
while [ -z "$(tail -1 sigusr2.out | grep ^EOF)" ]; do sleep 0.1; done
head --lines=-1 `pwd`/sigusr2.out