将脚本从 ksh 转换为 bash
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/56798/
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
Converting scripts from ksh to bash
提问by dr-jan
I have some ksh scripts which I'd like to convert to run with bash instead.
我有一些 ksh 脚本,我想将其转换为使用 bash 运行。
Are there any useful on-line resources for this?
是否有任何有用的在线资源?
I'm really looking for a list of differences between the two shells and any gotchas I might encounter, although all information is welcome :-)
我真的在寻找两个 shell 之间的差异列表以及我可能遇到的任何问题,尽管欢迎提供所有信息:-)
回答by ColinYounger
回答by Tim Kennedy
Here's a comparison from HP on the differences between shells:
以下是 HP 对 shell 之间差异的比较:
Here's a great set of UNIX shell tutorials from Richard's Shell Scripting Universe:
下面是来自 Richard 的 Shell Scripting Universe 的一组很棒的 UNIX shell 教程:
The second is by far one of the most useful scripting resources I have found, and it really helps you learn how to write scripts with portability in mind.
第二个是迄今为止我发现的最有用的脚本资源之一,它确实可以帮助您学习如何编写具有可移植性的脚本。
Good luck with your conversions.
祝您转换顺利。

