Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


Search this Thread
Old 08-11-2004, 08:03 AM   #1
Registered: May 2004
Posts: 80

Rep: Reputation: 15
redirection in C

how to redirect the output of a print statement in C to a file
printf("hi there") to file1
is there any other way??
Old 08-11-2004, 08:10 AM   #2
Registered: Oct 2003
Location: Europe/Sweden
Distribution: RedHat
Posts: 78

Rep: Reputation: 15
School assignments should read fprintf and fopen.
Old 08-11-2004, 01:06 PM   #3
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
and check out dup2() as well.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
what is output redirection? LinuxPadawan General 5 05-18-2005 12:53 PM
Transparent redirection Hugo Orlando Linux - Networking 4 05-12-2005 05:26 PM
error redirection raumohir Linux - Newbie 4 03-30-2005 12:13 PM
communication redirection chtthies Linux - Networking 1 12-08-2003 10:49 AM
Device Redirection CPUNeck Linux - Newbie 1 12-20-2001 01:27 PM

All times are GMT -5. The time now is 11:00 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration