0

I have some shell scripts (bash) work correctly on mac. But i want to run them on windows in C#. I think cygwin can make this. but i don't know how to write the code. is there anybody can help me?

2
  • Hope I understood your question correctly: stackoverflow.com/questions/15234448/… Commented Oct 28, 2014 at 6:49
  • @Jannik Thanks, let's say i have a command line:"./foo.sh -c black." how to run this? Commented Oct 28, 2014 at 7:10

1 Answer 1

0

You can use the Process class to use CYGWIN under C#.

There are other questions dealing with CYGWIN. Look at this question: bash pipes - I am trying to call script from c#

Sign up to request clarification or add additional context in comments.

3 Comments

i can run it in c# now. but some of the commands can't been found. such as type/dirname/grep. how to set the command's path to make the scripts run correctly?
The question I linked you in the answer above deals with that question. It seems like you have to have to set the path inside your script :)
Thanks Jannik, i made it as your comments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.