shell脚本的编译器 [英] Compilers for shell scripts

查看:199
本文介绍了shell脚本的编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你知道是否有任何工具来编译bash脚本?

Do you know if there's any tool for compiling bash scripts?

如果该工具只是一个翻译器(例如,将bash脚本转换为C程序的东西)就没关系,只要翻译的结果可以编译。

It doesn't matter if that tool is just a translator (for example, something that converts a bash script to a C program), as long as the translated result can be compiled.

我在寻找像 shc (这只是一个例子 - 我知道shc不能作为编译器工作)。是否还有其他类似工具?

I'm looking for something like shc (it's just an example -- I know that shc doesn't work as a compiler). Are there any other similar tools?

推荐答案

Google搜索带来 CCsh ,但它会将您设置为每台机器的许可证$ 50。​​

A Google search brings up CCsh, but it will set you back $50 per machine for a license.

文档说CCsh编译Bourne Shell(不是bash ...)脚本到C代码,它了解如何复制50奇数标准命令的功能,避免需要 fork 他们。

The documentation says that CCsh compiles Bourne Shell (not bash ...) scripts to C code and that it understands how to replicate the functionality of 50 odd standard commands avoiding the need to fork them.

但是CCsh不是开源的,所以如果它不做你需要的(或期望),你将无法看看源代码找出原因。

But CCsh is not open source, so if it doesn't do what you need (or expect) you won't be able to look at the source code to figure out why.

这篇关于shell脚本的编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆