Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a program that takes a -o log_file option, which writes extra data to log_file.

Is there any way for me to redirect that to stdout?

i.e. is there a "special name" for stdout that can be used as a file name, like CONOUT$ on Windows?

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

Usually, programs write automatically to stdout if you don't specify a -o option. In the case you must go through the -o option, you can use -o /dev/stdout.

share|improve this answer
    
Ahhh /dev/stdout is exactly what I needed. Thank you!! :) –  Mehrdad Jul 30 '11 at 21:32
2  
And I won't call that "redirection" but just "direction" :-) –  Stéphane Gimenez Jul 30 '11 at 21:32
1  
Lol whatever you say :) –  Mehrdad Jul 30 '11 at 21:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.