What I'm trying to do is:
What I have tried so far (unsuccessfully):
./myProgram | tee > (myLogger log.txt) | head > firstLines.txt
The problem is that myProgram
exits as soon as the head
exits.
Even if I use the -i
command in tee
, I cannot get myProgram to continue to work.
Since the registrar can add incoming text to an existing file, executing head log.txt > firstLines.txt
will not work in this case.
source share