Share your knowledge at the LQ Wiki.
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 05-27-2002, 10:14 PM   #1
LQ Newbie
Registered: Aug 2001
Posts: 9

Rep: Reputation: 0
Executing command lines in C/C++

Lord of the newbies here again. How does one execute a particular command line (such as "ping") in C/C++ on a Mandrake 8.0 machine (or linux in general)? Do you have to use a special function like Winexec() in Windows? If so, what is the name of this function, and what file is it declared in? If not, how do I do this?
Thanks in advance,
Old 05-28-2002, 07:53 AM   #2
Registered: Apr 2002
Location: Brazil
Distribution: Slackware
Posts: 184

Rep: Reputation: 30
Don't misunderstand me, I'm not rude, but do a search before asking this kind of question.

I saw it answered 3 or 4 times, only this week...

BTW, you're looking for the system() function.

'man system' may help.

Old 05-28-2002, 03:08 PM   #3
LQ Newbie
Registered: Aug 2001
Posts: 9

Original Poster
Rep: Reputation: 0
sorry about that. You're not being rude. I was just being stupid. I was tired.


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
executing a command at a certain time pantera Programming 6 04-05-2005 01:22 PM
Executing commands and getting command results. xconspirisist Programming 2 03-11-2004 03:52 PM
executing from command line nodger Linux - Newbie 3 01-20-2004 11:30 AM
::Command Executing in Webmin:: XxAndyxX Linux - Software 0 03-07-2003 02:04 PM
command lines? rockin chair Linux - General 5 04-28-2002 11:48 PM

All times are GMT -5. The time now is 07:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration