Linux 在 Windows 环境中使用 shell 脚本的好 IDE 是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3793818/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is a good IDE for working with shell-scripting in a Windows environment?
提问by ykombinator
I have already learned shell-scripting in Linux environment.
我已经在 Linux 环境中学习了 shell 脚本。
However, now I am unable to install Linux on my PC, but I need to practice shell-scripting.
但是,现在我无法在我的 PC 上安装 Linux,但我需要练习 shell 脚本。
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?
目前,我的 PC 上安装了 Windows XP。是否有任何已知的 IDE 可以帮助我在 Windows 环境中练习 shell 脚本程序?
采纳答案by ykombinator
I found a cool OnlineIDE, which will perhaps help me to write simple bash scripts.
我找到了一个很酷的在线IDE,它可能会帮助我编写简单的 bash 脚本。
Here it is: Ideone.com
这是:Ideone.com
回答by lisak
If you are using eclipse for other programming language like JAVA, C++, PHP, I'd recommend this plugin
如果您将 Eclipse 用于其他编程语言,如 JAVA、C++、PHP,我会推荐这个插件
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.
关于“脚本语言的 IDE”,其他编译型和面向对象语言的 IDE 提供的功能是基于编程语言能力和面向对象范式的编译器.... IDE 对脚本语言的支持是不是很有帮助。
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.
最简单的方法是使用 linux LiveCD 或虚拟盒,这两种选择都不会有问题。使用 Linux Bash/shell,您将获得学习 shell 脚本所需的支持,例如带有详细输出的 shell 调试模式(使用 -x -v 参数运行),您可以在其中查看代码的解释方式等。
回答by tdammers
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.
Windows 中的 Shell 脚本与 linux 有很大不同——语法几乎完全不同,而 cmd.exe 与 bash、csh 或 ksh 只是一个完全不同的环境。我希望你的考试是关于 unix/linux shell 脚本,而不是 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).
如果你想接近,cygwin 可能会成功;它为 Windows 提供了一个基本的 UNIX 层,为您提供了 UNIX 命令行的大部分功能。尽管如此,它仍然不是真实的。此外,下载和刻录 Live CD 并启动它比安装 cygwin(并使其正常工作)更容易。
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.
我也很好奇你的分区表是如何损坏的,从而阻止你安装 Linux,但允许你完美地启动到 XP。
回答by Lavir the Whiolet
Try CYGWIN. This project is intended to recreate UNIX environment in Windows.
试试 CYGWIN。该项目旨在在 Windows 中重新创建 UNIX 环境。
回答by Matt Baker
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.
如果您的计算机有果汁,您可能想要下载Oracle Virtualbox(它是免费的!)并安装许多 Linux 发行版之一(Ubuntu 可能是最好的)作为虚拟机。这样您就拥有了一个真实的环境,而不必离开您的主要操作系统。
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).
就 IDE 而言,如果您只是在寻找语法高亮显示,我相信 gnome 的 gedit(应该随 Ubuntu 一起提供)将针对 .sh 脚本进行语法高亮显示。我怀疑为此目的存在更强大的东西(即代码完成等)。