eclipse下搭建shell脚本编辑器--安装开发shell的eclipse插件shelled

 1、安装“man-page viewer”插件(ShellEd需要,有的机器不需要,先装上)

安装地址:http://download.eclipse.org/technology/linuxtools/updates-nightly/

image

2、安装“shelled”插件

http://sourceforge.net/projects/shelled/files/latest/download下载ShellEd的zip包

image

以archive,即zip包的方式设置数据源:

image

image

在shell文件上点右键->open with->选择shell script Editor,发现打开的SHELL的文件已经语法高亮:

image

有的eclipse默认是用eclipse自带的text editor打开shell文件的,安装了shelled之后,可以修改使用shelled默认打开*.sh文件,如果没有*.sh这个选项,可以在右边add按钮手工添加一个:

image

3、安装可以直接在windows的eclipse运行shell的解释器interpreter

在windows下运行shell有很多方法,CygWin感觉太笨重了,这里推荐两个工具:

http://win-bash.sourceforge.net/
http://unxutils.sourceforge.net/

下载第一个,解压到指定目录,然后打开eclipse:

image

通过添加的方式设置shell解释器,直接选定解压后目录中的sh.exe即可。

然后写一个shell测试一下是否能运行:

image

shell文件最终是要在linux运行的,在windows的eclipse中运行shell最多只能用来调试,解除一些基本的BUG,大家在这里开发完一定要在Linux下再测试一下。

 

转自:https://www.cnblogs.com/shellshell/p/6122811.html

Eclipse 安装 ShellEd 不成功的解决办法https://www.cnblogs.com/lasclocker/p/4405597.html

posted @ 2019-07-15 00:06  秦时明月之君临天下  阅读(329)  评论(0编辑  收藏  举报
返回顶部
返回主页