Subj : Re: /dev/tty: all output, too? To : comp.os.linux,comp.os.linux.misc From : st0ut Date : Wed Aug 25 2004 12:10 pm On Tue, 24 Aug 2004 19:55:57 -0700, Aarlo Stone Fish wrote: > I am trying to write a program that reads all text output (and then does > something with it). It seems that /dev/std{out,in,err} and /dev/tty only > release data input by the user to the terminal. Is there any way for me to > capture all things like this: > char c; > c = 'h'; > write(1, &c, sizeof(c)); > I fork() and have the parent process continue with its regular writing and the > child process read from something like "/dev/tty". > > Thanks! > Aarlo Have you looked at awk / sed? cat $file.txt| sed /what you want to change/what you want to change it to guy .