Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Shell script under windows
Name: Matthijs_1971 Date: May 6, 2009 at 03:24:11 Pacific OS: Windows XP Subcategory: C/C++
Comment:
Hi,
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.
I do not use cygwin, but try treating your script as an argument to the shell:
system("c://cygwin//bin//bash.exe script.sh");
(I removed the < sign)
You may have to experiment. For example, you may have to use a full path to the script.sh file. Depending on how involved script.sh is, you may still have trouble executing it.
Also, script.sh can not easily return data to the calling "C" program.
Summary: Hi, I was wondering if I could compile and run simple shell scripts from windows xp. I have created a shell script with textpad but don't know how to test it. Honourable Buddha says "Shoot All Bad Pe...
Summary: hello, i have a question on shell script and another on Window Macro :) well, if i want a shell script never me any info or complaint whatever the task is a success or failure, eg. i want to cp files ...