Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] stdout redirection
- Date: Fri, 2 Mar 2007 14:18:04 +0900
- From: "Hector Akamine" <akamine@??>
- Subject: [tlug] stdout redirection
Hi,
I have a (C) program ("myprog") which outputs messages to stdout and stderr while running. If I invoke the program without any args, both stdout and stderr are shown in the console: $ myprog If I want to redirect the output to files, it is just matter of doing something like $myprog 1>log_stdout.txt 2>log_stderr.txt
However I have the following problems:
1) In the case the program does not return (i.e., waiting for a message or something, need to use Ctrl-C to terminate it), log_stdout.txt is empty (however log_stderr.txt correctly has the redirected stderr messages). This is weird for me because if I just do $myprog 2>log_stderr.txt stdout messages are shown in the console. Is this behavior normal? Is it possible to change this?
2) How can I do in order to show the messages both in the console and also to save those in a file?
Thanks, Hector
- Follow-Ups:
- Re: [tlug] stdout redirection
- From: Darren Cook
- Re: [tlug] stdout redirection
- From: Edward Wright
- Re: [tlug] stdout redirection
- From: Chris BALUTA
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Re: KDDI cellphones and encoding
- Next by Date: Re: [tlug] stdout redirection
- Previous by thread: Re: [tlug] Re: KDDI cellphones and encoding
- Next by thread: Re: [tlug] stdout redirection
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links