- 2
- 0
- 约2.27万字
- 约 29页
- 2016-12-01 发布于辽宁
- 举报
目 录
摘 要 1
前言 2
1 绪论 3
1.1 Shell的定义 3
1.1.1 UNIX Shell 3
1.2 shell的历史 4
1.3 shell的职责 4
2开发环境和开发工具介绍 6
2.1开发环境--Ubuntu 6
2.2开发工具-GCC 6
3 模拟shell设计 7
3.1简单shell设计思想 7
3.2复杂shell设计思想 8
3.2.1 作业及作业前后调度实现方法 8
3.2.2进程组、会话与终端 9
3.2.3命令行 10
3.2.4 &、bg、fg等信号的思想 10
3.2.5 管道 11
3.2.6重定向 11
4 Shell的实现 13
4.1数据结构 13
4.2 程序结构 13
4.2.1初始化环境 13
4.2.2解析命令 14
4.2.3查找外部程序 15
4.2.4执行命令 16
4.2.5管道 17
4.2.6作业控制命令 18
5 结束语 20
致谢 21
参考文献 22
附录 23
Linux命令解释器的设计
摘 要:随着Linux系统使用的越来越广泛,越来越多的人开始深入的研究Linux,特别是对Linux shell的研究是对Linux研究最主要的部分。本文主要是研究了对shell的功能的一些认识,而且对shell的列表,管道,输入重定向和输出重定向等命令功能进行了实现,可以对shell命令解释器进行更加全面的认识和充分的了解,而且在shell命令解释器中执行正确的命令,从而对它的原理,方法等在程序中必须用到的知识原理有比较清楚的认识,最后通过对每个功能的详细分析,进而编写出恰当实现各个功能的代码,从而做成一个Shell命令解释器。
并且,在嵌入式领域中,与人们的需求相比,硬件的资源是微不足道的。这就意味着我们把不多的资源利用完成很多的需求,而嵌入式的设计在PC上编程是有很大不同的,它其实只需要一个很大程序的比较小的一方面就可以满足它的需求,因此我们必须把一些无用的程序删掉来换成空间。在嵌入式领域中就像传统的K shell,C shell,Bourne shell等大型的shell程序就会令硬件方面的东西很少。因此我们需要一个更符合嵌入式系统中使用的Shell。
关键词:Shell;程序;设计与实现;嵌入式;Linux
Abstract:Accompanied by the popularize of the Linux,more and more people??are doing deeply study in it.The study of shell is the most important thing when study the Linux.It mainly includes the understand of some knowledge and function of the micro linux shell.Through the study of the orders in the shell like list,pipe,input redirect and output redirect,readers can have a thorough sense about the shell and learn to use these orders accurately in shell which play an important role in programming later.Code accurately and achieve a simple shell with the functions above after analyzing the details of every functions module.
Moreover,in the embedded field,the hardware resources are limited,but demand is unlimited.This means they have to use limited resources to accomplish a variety of needs and embedded design and programming in the traditional PC,is very different ,and it often requires only a small part of a large program on meet its needs,so we had to cut out a number of useless programs in exchange for space .In
您可能关注的文档
最近下载
- 提高市政雨水管道接口施工一次验收合格率.docx VIP
- 食品企业管理体系建立与认证吴亨覃海元61课件.pptx
- 新智能制造产业领域的智能仓储与物流解决方案.pptx VIP
- 电子科技大学860软件工程学科基础综合2020年考研专业课初试大纲.pdf VIP
- 2026人教版小学英语四年级上册期末综合试卷(3套含答案解析 打印版).docx
- 复杂底座的三维造型及数控加工工艺设计.docx VIP
- 2024北京昌平一中高三11月月考英语试题及答案.pdf VIP
- “建筑制图基础实训作业”及“建筑制图与识图实训小作业1-4部分参考答案”.pdf VIP
- 《食品企业管理体系建立与认证》课程标准.docx VIP
- 2025年房地产经纪人养老地产风险管理与应急预案专题试卷及解析.pdf VIP
原创力文档

文档评论(0)