简体   繁体   English

为Mac OS X创建bash的替代品

[英]Creating an alternative to bash for Mac OS X

Shell是普通的CLI应用程序,还是不同于接受来自标准输入的输入并将结果输出到标准输出的应用程序?

A shell reads standard input, writes to standard output/error as appropriate, and executes other programs. Shell会读取标准输入,并在适当时写入标准输出/错误,并执行其他程序。 If you are interested in what it takes to write one, I would recommend reading "UNIX Systems Programming" by Kay Robbins and Steve Robbins . 如果您对编写一个代码感兴趣,我建议阅读Kay Robbins和Steve Robbins撰写的“ UNIX系统编程” I haven't read this version, the original copy was named "Practical UNIX Programming" . 我尚未阅读此版本,原始副本名为“ Practical UNIX Programming” It does contain sections devoted to process management that include writing a very basic shell. 它确实包含专门用于过程管理的部分,包括编写一个非常基本的shell。 If you haven't read "Advanced Programming in the UNIX Environment" by Stevens , then I would suggest reading it as well. 如果您还没有阅读Stevens的“ UNIX环境中的高级编程” ,那么我建议您也阅读它。

No, a shell just reads from stdin and outputs to stdout. 不,shell只是从stdin读取并输出到stdout。 Obviously it does do more than that, but that's the basics. 显然,它的作用还不止于此,但这是基础。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM