I have a unix exicutable that renders video under os x (unix). As it renders frames it echos (or outputs) information to the terminal about which frame it's up too an how long it took etc. I am looking for a way to pipe this information so I can use it for other purposes. The problem is that when I pipe the information, it waits until all the frames have been rendered and then redirects the total output of information to the next command
Is there a way to pipe the echos to another command as they happen rather than waiting until the entire process has finished?
I've tried various methods of "render | do something else" without success.
When running the executable on a terminal without piping/redirecting, the output is line buffered so you see the info by lines. To force the output to be line buffered, either run the command under pty, or preload a share library which calls setbuf/setvbuf. If you have ssh running, do
thanks guys, appreciate it. Sorry to ask this but do you mind posting a codded example? Tried did some experiments with tee but just raised more questions :-)
as an experiment, I setup a function that mimicks what my video render is doing and tried to route it too the osx "say" command which just makes the mac speak the variable
This did not work. Any suggestions?
Thanks guys
Last edited by Scott; 02-25-2010 at 07:29 PM..
Reason: Code tags
Your shoutout function (executed by the shell) actually flushs each line. To simulate the frame rendering program, I will use perl which can be told to do line flushing or not:
Hi
There is an application installed on a server, that has a unique login account, but many users are using it with the same login name! How can we overcame this by creating individual accounts for the same application login account? (11 Replies)
i am trying to make powerterm not echo back this charactor.
≥
When I press control-C I get it that telnet charactor/garbage echos back.
how to turn off? where? what config? is there something in powerterm
to switch on/off? I do not see it.
Redhats offical statement is:
"I... (10 Replies)
I have some Solaris 9 systems and I'm interested in using the "fm" audit class to track changes to sensitive files but it's too verbose for it to be auditing to that level for EVERY file, so I was wondering if there were a way of restricting the audit of those events to particular files.
I... (0 Replies)
I got a question on ulimit on HP-UX. I have a log file that gets more than 2 GB and the application crashes because it can not write to log. I browsed through the forum and found one very similar post on ulimit but that was not concluded. Did some analysis and below is some output.
>getconf... (6 Replies)
Hi all,
I have a file im reading with a for loop using:
for i in $(cat filename)
do
etc.
done
the original file is 3 columns, this method prints it out into 3 rows, and i would like to just assign the first to rows (originally first two columns) to separate variables. What would be... (3 Replies)
I have a huge matrix file containing some 1.5 million rows and 6000 columns. The matrix looks something like this:
1 2 3
4 5 6
7 8 9
3 4 5
I want to add all the numbers in the columns of this matrix and display the result to my stdout. This means that the numbers in the first column are:
... (2 Replies)
Hi guys, hopefully this hasn't been asked before - couldn't see the question anywhere.
I have a large number of timestamps (hh-mm-ss-millisecond)
that I need to find the difference between e.g.:
14-11-07-513
14-11-07-644
Now the script that I have just knocked up is horrifically slow,... (4 Replies)