25

I have already learned shell-scripting in Linux environment.

However, now I am unable to install Linux on my PC, but I need to practice shell-scripting.

Currently, I have Windows XP installed on my PC. Is there any known IDE which can help me practice shell-scripting programs in windows environment?

Remi Guan
  • 21,506
  • 17
  • 64
  • 87
ykombinator
  • 2,724
  • 7
  • 25
  • 46
  • 3
    Virtual Machine isn't an option? – alternative Sep 25 '10 at 12:37
  • 1
    Powershell comes with an IDE, but are you asking specifically about bash or sh scripting? – 3Dave Sep 25 '10 at 12:51
  • 3
    Ohkay, My question is for bash scripting. – ykombinator Sep 25 '10 at 12:54
  • Are you looking for an IDE or will simple syntax highlighting do? Vim, emacs, nano and others will do syntax highlighting of shell scripts. – Dennis Williamson Sep 25 '10 at 14:44
  • 1
    @Reality_Rules so, you want to develop Unix/Linux scripts for bash, but you want an IDE for Windows? I'm confused. – 3Dave Sep 27 '10 at 15:34
  • 2
    Late answer after 10 years. Nowadays here in the future (2020), JetBrains' IDEs for other languages have the plugin available which allows to write, autocomplete, check the syntax and run shell scripts easily. So if you programming in some other lang and sometimes need to create some shell script, try this. Works like a charm. – biesior Sep 17 '20 at 01:59

5 Answers5

18

I found a cool Online IDE, which will perhaps help me to write simple bash scripts.

Here it is: Ideone.com

ykombinator
  • 2,724
  • 7
  • 25
  • 46
  • 3
    @osirisgothra Actually "we" don't care who answers it as long as it is a valid answer, even if it is the person asking the question. Take a look at: http://meta.stackexchange.com/help/self-answer – therealrootuser Jun 12 '14 at 04:11
  • @osirisgothra Honestly, I wanted people to check out the answer and I believe it was useful to many people out there - rather than me just editing the question or commenting up there. Thank you :) – ykombinator Jun 25 '17 at 00:54
  • beyond some syntax highlighting that most text editors do, I don't see anything special here. I was looking for something that would find unused variables, inline variables, extract methods etc. – Sridhar Sarnobat Dec 13 '17 at 00:08
7

If you are using eclipse for other programming language like JAVA, C++, PHP, I'd recommend this plugin

There is a fact as to "IDE for scripting languages" that the features that other IDEs for compiled and object oriented languages provide are based on the compiler of the programming language abilities and object oriented paradigms.... Support from IDE for scripting language is not so helpful.

The easiest way would be either linux LiveCD or virtual box, you shouldn't have problem with both alternatives. With Linux Bash/shell you'll get a support you need for learning shell scripting, like shell debug mode with verbose output (run with -x -v parameters) where you can see how the code is being interpreted etc.

lisak
  • 21,611
  • 40
  • 152
  • 243
  • 2
    Is it recommended with netbeans6.9? I am much comfortable with it. Eclipse may do though. – ykombinator Sep 25 '10 at 12:55
  • I don't think there is a netbeans plugin for shell scripting... But as I said, the shell editor wouldn't provide useful support anyway. – lisak Sep 25 '10 at 13:40
7

Shell scripting in windows is substantially different from linux - the syntax is pretty much completely different, and cmd.exe is simply a totally different environment than bash, csh or ksh. I'd expect your exam to be about unix/linux shell scripting, not cmd.exe.

If you want to get close, cygwin might do the trick; it provides a basic UNIX layer for windows, giving you most of the UNIX command line's functionality. It's still not the real thing though; also, downloading and burning a live CD and booting it is less of a hassle than installing cygwin (and getting it to work properly).

I'm also curious how your partition table can be damaged in a way that prevents you from installing Linux, yet allows you to boot into XP flawlessly.

tdammers
  • 20,353
  • 1
  • 39
  • 56
  • Yes. My exams are for Linux shell-scripting, to be precise bash scripting. Well, I'd definitely try out cygwin and post my reviews about it. – ykombinator Sep 25 '10 at 13:24
6

If your computer has the juice, you may want to download Oracle Virtualbox (it's free!) and install one of the many Linux distros (Ubuntu is probably the best) as a virtual machine. That way you have a real environment without having to leave your primary OS.

As far as an IDE, if you're simply looking for syntax highlighting I believe gnome's gedit (which should come with Ubuntu) will do syntax highlighting against .sh scripts. I doubt something more robust exists for this purpose (i.e. with code completion and such).

Matt Baker
  • 3,394
  • 3
  • 25
  • 35
2

Try CYGWIN. This project is intended to recreate UNIX environment in Windows.

Lavir the Whiolet
  • 1,006
  • 9
  • 18