Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Bash script on the Windows XP command line

Tags:

windows-xp

How do I create a file and run a Bash script on the Windows XP command line?

I only know commands in Linux. :)

like image 562
Suezy Avatar asked Jul 05 '10 04:07

Suezy


2 Answers

Windows doesn't use the Bash shell, so therefore it has no Bash scripting. You could use Cygwin to run a virtual Linux environment within Windows.

What exactly are you trying to accomplish?

like image 28
Bartek Avatar answered Sep 24 '22 03:09

Bartek


Two ways to go.

If you want a quick light wieght solution install "Unix Shell Utilities" which features a bourne shell inplementation and most of the basic unix command line tools (sed , grep awk etc). This will work only if you have a simple script and use the command line tools in a very basic standard way.

Or as the other posters suggest install cygwin (this is a pretty major install!) which will give you a complete *nix environment on your PC, or "mingw" which is a stripped down cygwyn with just enough functionality to run the gcc compiler family but might be enough for your needs.

like image 72
James Anderson Avatar answered Sep 22 '22 03:09

James Anderson