LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Linux equivalent of WinXP's cmd.exe /c (https://www.linuxquestions.org/questions/linux-software-2/linux-equivalent-of-winxp%27s-cmd-exe-c-563749/)

zhou059 06-22-2007 11:59 AM

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?

Thanks,
Jon

Valkyrie_of_valhalla 06-22-2007 12:39 PM

try:

bash -c "program name"


All times are GMT -5. The time now is 08:36 AM.