test1.c
来自「这个是学习嵌入式开发的重要例子」· C语言 代码 · 共 16 行
C
16 行
#include <stdio.h>int main(int argc, char **argv){ // step 1, get commands from user input. // step 2, parse command and get all commands // step 2.5, create a pipe // step 3, fork // step 3.1, ls process close stdout, and write output to pipe // step 3.2, grep process close stdin, and read data from pipe // step 4, exec(ls) // step 5, exec(grep) return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?