Shell script under windows

May 6, 2009 at 03:24:11
Specs: Windows XP

I need to run a very complicated Bourne shell script under windows from a very complicated C++ Windows program. Of course, there is cygwin to emulate a linux environment, and there is system to place a call from C++ to start up cygwin.

But... how do I convince cygwin to run my script? I have no clue...

I need to pass the script's name to the bash.exe of Cygwin or so.

>>system("c://cygwin//bin//bash.exe <");

Who can help?

Thank you, kind regards, Matthijs.

See More: Shell script under windows

Report •

May 6, 2009 at 07:17:58
I do not use cygwin, but try treating your script as an argument to the shell:


(I removed the < sign)

You may have to experiment. For example, you may have to use a full path to the file. Depending on how involved is, you may still have trouble executing it.

Also, can not easily return data to the calling "C" program.

Report •
Related Solutions

Ask Question