1 shell是什么
它是一种脚本语言,并非编程语言
可以使用一些逻辑判断、循环等语法
可以自定义子函数
是系统命令的集合
2 shell 的编程格式:
#!/bin/bash shell脚本的第一句##The first test shell script. 介绍这个shell脚本的作用##Written by yanlong. 由谁写的
3 如何执行shell脚本
**① bash/sh 脚本名 ** eg: bash yl.h<br /> -x 一步一步看到执行脚本过程 eg: bash -x yl.h**② 给这个脚本加上x权限 chmod +x yl.sh**<br /> /tmp/yl.sh
4 两个内嵌的shell参数传递
cat xiao.shsh bai.sh $*cat bai.shfor i in $*doecho $idone###执行sh xiao.sh a b x
