本科毕业设计 linux,本科毕业设计—linux命令解释器的设计本科.doc

目 录

摘 要1

前言2

1 绪论3

1.1 Shell的定义3

1.1.1 UNIX Shell3

1.2 shell的历史4

1.3 shell的职责4

2开发环境和开发工具介绍6

2.1开发环境--Ubuntu6

2.2开发工具-GCC6

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值