'script' command in terminal, looking for a flush open
When I use 'script' on a unix terminal the -f option flushes the data straight to the file - from the man page "-f Flush output after each write. This is nice for telecooperation: One person does mkfifo foo; script -f foo' and another can
supervise real-time what is being done using
cat foo'."
This is a really handy option for me - but the version of the script command on my mac appears to be lacking this option. Are there any ways I can achieve the functionality?
Solution 1:
You can achieve more or less the same result by running
script -t 0
From the man page:
-t time Specify time interval between flushing script output file.
A value of 0 causes script to flush for every
character I/O event. The default interval is 30 seconds.