ok, i found the solution if anybody interested in it: tee -a logfile | mosml | tee -a logfile
only one problem with this: if mosml has finished i need to press a ctrl+D. I read the manual, but unfortunately redirection cannot redirect the given input of a program into a file, just can redirect the input from a file into a program. So, my question, If there is a program with a promt, for example an installation program, or ML interpreter, or whatever, how can i log the stdout and stdin without distrurbing the run of the program? Just an example: [EMAIL PROTECTED]:~$ /usr/bin/sajat/mosml Moscow ML version 2.00 (June 2000) //program output line Enter `quit();' to quit. //program output line - fun db s = s ^ s; //program input line > val db = fn : string -> string //program output line - db "asdff"; //program input line > val it = "asdffasdff" : string //program output > line - quit(); //program input line [EMAIL PROTECTED]:~$ my question is, that how should i start mosml, if i want to have the all output and input line of the program (output line is what the program write, and input line is that what i type in) into the "logfile"? (in the order as above). tee logfile | mosml | tee logfile logs what i need, but in a wrong order. First the stdin, and then the all stdout, and not common. Anybody could help me please? On Sun, Feb 15, 2004 at 08:21:59AM +0100, Na Zo wrote: > Is there any way to log into a file by an interactive program the stdout and the stdin? I tried out tee, screen, and script, but didn' t find the solution. By that interactive program i' d like to log all characters on the console. For example "program | tee file" will log only the stdout, and "tee file | program | tee file" will log at first the stdin and just after the stdout into the file, so in a separated way. man sh /^REDIRECTION -- Jan Minar "Please don't CC me, I'm subscribed." -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]