LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 07-25-2003, 12:48 PM   #1
sheek
LQ Newbie
 
Registered: Jul 2003
Posts: 10

Rep: Reputation: 0
Redirect


Hey guys i wrote a simple c program using the system function using the command ipconfig(system("ipconfig /all"); .How would i redirect or copy the output in the screen to a text file for manupilation?
 
Old 07-25-2003, 12:53 PM   #2
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
either popen()/pclose() or pipe()/fork()/dup2()/exec() the first choice is easier but has more security risks and less functionality. the second choice is more secure and more functional but requires a bit more code/understanding. you can look up the functions in there respective manual pages.
 
  


Reply


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
redirect matt1982 Programming 2 12-20-2004 09:53 AM
PHP Redirect Elijah Programming 2 09-09-2004 09:56 PM
Redirect wonderland Linux - Newbie 3 05-24-2004 11:50 PM
redirect into C++ without a file ? C++Boar Programming 1 04-24-2004 10:20 AM
redirect spank Linux - Newbie 2 03-01-2004 03:38 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:05 PM.

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