20.16/20.17 shell中的函数

Linux学习笔记6月1日任务

Linux学习笔记6月1日任务

$1为第一个参数的值;$2为第二个参数的值;$0为脚本名;$#为参数个数;

Linux学习笔记6月1日任务Linux学习笔记6月1日任务

Linux学习笔记6月1日任务Linux学习笔记6月1日任务

获取主机IP地址命令,#ifconfig | grep -A1 "$1" | awk ' /inet/ [print $2] '


20.18 shell中的数组

Linux学习笔记6月1日任务

Linux学习笔记6月1日任务

打印数组所有值,#echo ${a[*]}

打印数组第一个值,#echo ${a[0]}

打印数组第二个值,#echo ${a[1]}

Linux学习笔记6月1日任务Linux学习笔记6月1日任务


20.19 告警系统需求分析

Linux学习笔记6月1日任务

Linux学习笔记6月1日任务

Linux学习笔记6月1日任务

Linux学习笔记6月1日任务