
shell的典型应用
LY071
这个作者很懒,什么都没留下…
展开
-
shell的典型应用--场景控制脚本
语法:i=0 声明和初始化变量,=号两边不能有空格declare -A array1 声明数组array1${i} 引用变量ifor循环for script_file in `ls -I "monitor.sh" ./ `do echo -e '\033[40;35m' "The script:" ${i} '==>' ${script_file} '\033[0m' i...原创 2020-01-30 11:16:29 · 344 阅读 · 0 评论 -
shell的典型应用--vim编辑器的设置
vim可以提高shell编程的效率一、设置方式的分类1、方式一:临时性的设置2、方式二:永久性的设置(vimrc文件)二、语法1、syntax on 设置高亮2、set nu 显示行号3、set autoindent和set cindent 自动缩进4、...原创 2020-01-30 09:49:10 · 128 阅读 · 0 评论 -
shell的典型应用--shell中的关联数组
数组:1、普通数组 : 只能使用整数作为数组的索引2、关联数组 : 可以使用字符串作为数组的索引声明关联数组# declare -A ex_array 声明一个数组 ex_array初始化数组ex_array[index1] = value1;...原创 2020-01-30 09:48:23 · 382 阅读 · 0 评论 -
shell的典型应用--shell的高亮显示
基本格式:echo -e 终端颜色 + 显示的内容 + 结束后的颜色实例:1、echo -e “\e[1;66m i am handsome \e[1;0m”其中\e[1;66m中的1表示设置终端颜色,如果为0则不设置终端颜色2、echo -e “\e[1;66m” " i am handsome " $(tput sgr0)$(tput sgr0) 表示初始化输出的终端以上的写法在...原创 2020-01-30 09:34:35 · 950 阅读 · 0 评论 -
shell的典型应用--场景脚本的介绍
1、提取linux操作系统的信息2、获取操作系统的运行状态3、分析应用状态4、应用日志分析原创 2020-01-29 14:25:34 · 456 阅读 · 0 评论