1. 基本概念(这是理解后面的知识的前提,请务必理解) a. I/O重定向通常与 FD有关,shell的FD通常为10个,即 0-9: b. 常用FD有3个,为0(stdin,标准输入).1(stdout,标准输出).2(stderr,标准错误输出),默认与keyboard.monitor.monitor有关: c. 用 < 来改变读进的数据信道(stdin),使之从指定的档案读进: d. 用 > 来改变送出的数据信道(stdout, stderr),使之输出到指定的档案: e. 0 是 &…
一.case命令 case variable invalue1) command(s);; value2) command(s);; *) command(s);; esac 如果case变量没有被匹配,程序就执行*)后面的语句.case值中允许出现Shell通配符和竖线(|)作为OR操作符 二.if命令 if commandthen command(s) fi if test expressionthen command(s) fi if [ string/numeric expression…