⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dshell.h

📁 本软件模拟Shell 的命令解释程序
💻 H
字号:
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <errno.h>#ifndef all#define all/*命令行数据结构*/
typedef struct Command
{
	char **argv;//存放各参数的内容
 	int argc;//外部命令参数的个数
}Cmd;void processComd(Cmd* pC, char* pBuf);//删除连续空格,并将各个命令参数保存起来void ExecuteCd(char path[]);//执行cd指令void findExec(Cmd* pC, char* pBuf);//查找文件int isBackground(Cmd* pC);//后台设置void redirectInOut(Cmd* pC, int* piid);//输入输出重定向int* CreatPipe(Cmd* pC);//创建管道char* Pipe(char* pBuf);//创建管道进程#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -