为 Mac OS X 创建 bash 的替代方案

发布于 2024-09-07 13:55:05 字数 58 浏览 1 评论 0原文

shell 是普通的 CLI 应用程序,还是与从标准输入接受输入并在标准输出上输出结果的应用程序不同?

Is a shell a normal CLI application, or is it different from an application that accepts input from standard input, and outputs the result on standard output?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

塔塔猫 2024-09-14 13:55:05

shell 读取标准输入,根据需要写入标准输出/错误,并执行其他程序。如果您对编写一个程序感兴趣,我建议您阅读 " UNIX 系统编程”,作者:Kay Robbins 和 Steve Robbins。我还没有读过这个版本,原版名为“实用 UNIX 编程”。它确实包含专门讨论进程管理的部分,其中包括编写一个非常基本的 shell。如果您还没有阅读“UNIX 环境中的高级编程” 作者:Stevens,那么我也建议您阅读它。

A shell reads standard input, writes to standard output/error as appropriate, and executes other programs. If you are interested in what it takes to write one, I would recommend reading "UNIX Systems Programming" by Kay Robbins and Steve Robbins. I haven't read this version, the original copy was named "Practical UNIX Programming". It does contain sections devoted to process management that include writing a very basic shell. If you haven't read "Advanced Programming in the UNIX Environment" by Stevens, then I would suggest reading it as well.

话少心凉 2024-09-14 13:55:05

不,shell 只是从 stdin 读取并输出到 stdout。显然它的作用远不止于此,但这就是基础。

No, a shell just reads from stdin and outputs to stdout. Obviously it does do more than that, but that's the basics.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文