freesia810 / myshell Goto Github PK
View Code? Open in Web Editor NEWFinal project for ZJU Linux Programming Design
Final project for ZJU Linux Programming Design
myshell 模拟bash脚本 ------------------ 内部命令(由内置的函数实现): bg [任务号] 将后台挂起的任务继续在后台执行 cd [目录] 跳转工作目录 clr 清屏 dir ([目录]) 列出(当前)目录的文件结构 echo [参数] 输出内容 exec [command [arguments...]] 执行命令 exit 退出程序 fg [任务号] 将后台挂起或运行的任务继续在前台执行 help 帮助文档 jobs 列出当前的所有任务 pwd 列出当前工作目录 set 列出所有环境变量 test [表达式] 提供文本、整数、字符串的比较判断 time 显示当前时间(精确到秒) umask ([模式]) 改变权限掩码(无参数则显示当前掩码) ------------------ 外部程序调用: 除去上述关键字外,myshell会将其他的输入视为外部程序调用: program arguments... ------------------ 其他特性: -> 在命令(包括外部程序)末尾空格后加上 & 可以实现后台执行命令,通过任务系统提供的作业号可以执行对应的操作. -> 提供了 < 、 > 、 >> 三种重定向方式, < 用于重定向输入; > 和 >> 用于覆盖和追加的重定向输出. -> 提供了文件脚本的输入方式,在执行myshell程序时加上文件路径参数即可实现文件输入: ./myshell batchfile -> 提供了内部命令的管道操作(只支持两个指令的管道): cmd1 | cmd2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.