Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-22-2007, 12:59 PM   #1
LQ Newbie
Registered: Jun 2007
Posts: 4

Rep: Reputation: 0
Linux equivalent of WinXP's cmd.exe /c

Hi all,

I'm a newbie at Linux and have been trying to get my program that I wrote under winXP to work on Linux. A problem that I'm facing is that I created a child process in my program previously using the createProcess fn. Although I've heard about fork and exec to create a child process in Linux, I cannot use these to the best of my knowledge as the program I'm calling requires that it be called through the command console in Windows or bash in Linux.

As such, it seems that I should call the process through system(...). I believe I can use system(cmd.exe /c "<program name> ...") in windows to call the child process.

So my question is, what is the bash equivalent for cmd.exe?

Old 06-22-2007, 01:39 PM   #2
Registered: Jan 2006
Location: Romania
Distribution: Suse 12.0, Slackware 12.1, Debian, Ubuntu, Gentoo
Posts: 301

Rep: Reputation: 30

bash -c "program name"


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
equivalent Linux command for windows start cmd alix123 Programming 4 11-16-2008 07:06 PM
Using Sed under CMD.exe (windows) Burgin Programming 5 11-26-2004 03:17 PM
Can Linux access WinXP's shared folder? davidas Linux - Newbie 5 04-17-2004 05:48 AM
Is there an equivalent cmd to "chkconfig (redhat)" in Debian? davidas Debian 3 04-08-2004 11:54 PM
How to boot Linux from WinXP's bootloader? Z3RatuL Linux - General 3 03-01-2004 11:03 AM

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