LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 03-08-2006, 02:11 AM   #1
pat_and_cami
LQ Newbie
 
Registered: Feb 2006
Posts: 16

Rep: Reputation: 0
Call Linux Shell Command from within *.c program in userspace?


Is there a way to call a linux shell command from inside your *.c program? For instance, I would like to invoke 'ls *.dat' inside my *.c file, and redirect it's output to a file or to memory. Does anyone have an example for this, or can point me to an example somewhere?


Thanks, Pat//
 
Old 03-08-2006, 02:39 AM   #2
jean nits
LQ Newbie
 
Registered: Nov 2005
Posts: 1

Rep: Reputation: 0
may be the system() api help. look for its man page.
 
  


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
How do you call delay/udelay/mdelay timer in userspace? pat_and_cami SUSE / openSUSE 0 02-23-2006 02:37 AM
Urgent: Call a C program through Linux shell script nuwandee Programming 14 04-10-2004 07:31 PM
How to call the arp linux shell command from within a perl program Bassam Programming 1 03-11-2004 02:00 AM
call shell or other program out of my_program lea Programming 3 10-09-2002 10:51 AM
how to put a shell call in a C/C++ program? Hano Programming 8 05-19-2002 02:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 07:42 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