LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Windows "Linux Script" Compiler (https://www.linuxquestions.org/questions/linux-newbie-8/windows-linux-script-compiler-792294/)

DJBruteForce 03-01-2010 03:32 AM

Windows "Linux Script" Compiler
 
Hi there, I'm new to linux and the forum here. I'm a c#/sap developer. I'm trying to figure out if it's possible to test linux scripts in widnows? like with a compiler or something. I'm learning the script and don't want to install the o/s just for that.

Thanks,
DJ

brianL 03-01-2010 04:12 AM

Do you mean shell scripts, for bash? Yeah, install cygwin.

neonsignal 03-01-2010 05:37 AM

As brianL says, cygwin is the best option.

There was a direct port of bash to Windows some time ago, but it is not up to date.

Another way would be to install something like CoLinux, which will run Linux natively under Windows (ie, without requiring a virtual machine or dual boot). Or even just run a live Linux CD.

i92guboj 03-01-2010 06:02 AM

I suggest either cygwin or linux inside an VM like vmware or virtualbox.

It depends on what do you mean by "script". If you mean "shell script" then you are going to be relying in a shell to run it, hence you need a way to make the shell and the regular userland tools available. Shell scripts usually call external tools, no amount of compiling can sort that out because those external tools are not present in a regular Windows installation. You need to -somehow- emulate a posix environment with at least the basic tools that most shell scripts will need.

You can as well use something like putty to remotely login into a linux or unix machine, assuming you can get access to a shell account somewhere.

DJBruteForce 03-02-2010 01:21 AM

Thanks guys, I've installed Cygwin and it seems to have most of the basic commands. Missing "vi" though ;)

i92guboj 03-02-2010 02:23 AM

You should be able to install vim on cygwin. I have no first hand experience with it, though.

brianL 03-02-2010 03:11 AM

Yes, you can get Vim, but not vi. Run setup.exe again, scroll down to Editors, you'll find it there.


All times are GMT -5. The time now is 06:01 AM.