Linux / UNIX Tech Support Forum
This is a discussion on how to Write Terminal command data into a file within the Coding in General forums, part of the Development/Scripting category; Hi.. m trying to make a program in C which executes some command through system(). I want to write the ...
|
|||||||
| Coding in General Discussion on PHP/Perl/Python/Ruby/GNU C or C++. MySQL, PgSQL and (X)HTML or any other programming languages you want. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi..
m trying to make a program in C which executes some command through system(). I want to write the output of that command into a file and inspite of printing the output on the terminal. . How can i do it in C. please give me some idea, n please send some example if u can .. Thanks in advance. |
| Sponsored Links | ||
|
|
|
||||
|
Have you tried out?
Code:
system("ls >output.txt");
__________________
Vivek Gite Linux Evangelist |
![]() |
| Tags |
| c program , c system() , gcc , linux c program |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Parse XML file and store data in array in shell scripting | Nishanthhampali | Shell scripting | 6 | 15-12-2009 07:37 PM |
| Mounting a file server with data from a sql database. | sempinsenzai | File Servers | 0 | 17-12-2008 05:20 AM |
| GDM could not write to your authorization file | kami | CentOS / RHEL / Fedora | 0 | 07-05-2008 01:58 AM |
| Rearange Data from a file to another | sebastanov | Shell scripting | 1 | 16-04-2008 10:46 AM |
| how to open an pdf file(.pdf) in terminal | chandrasekar | Getting started tutorials | 1 | 27-03-2008 12:41 AM |