ViM编辑器的使用

命令模式---------------输入模式(a,o,i)-----------------末行模式


命令模式:dd--------剪切、删除

                yy--------复制整行

                n---------下一个字符串

               N---------上一个字符串

                u---------撤销上一步操作

                p---------粘贴dd或者yy的内容

末行模式

              :w       :wq!     :set nu显示行号    :整数跳转到改行   

              /字符串:从上至下搜索     配合n/N使用

             /?字符串:从下至上搜索     配合n/N使用

LinuxProbe第五课笔记_LinuxProbe笔记

LinuxProbe第五课笔记_LinuxProbe笔记_02

经典软件仓库配置

LinuxProbe第五课笔记_LinuxProbe笔记_03

编写Shell脚本

脚本结构:脚本声明“#!声明何种编辑器的脚本”

                脚本注释“#”  解释脚本的使用用意

                脚本命令“Linux命令集合” 例如:ps aux | grep sshd、ls -al、passwd --stdin

脚本后缀:“.sh”

脚本的参数说明:$0对应的是当前shell脚本程序的名称

                          $#对应的是总共有几个参数

                          $*对应的是所有位置的参数值

                          $?对应的是显示上一次命令的执行返回值

                          $1\$2\$3.........分别对应着第N个位置的参数值

LinuxProbe第五课笔记_LinuxProbe笔记_04

LinuxProbe第五课笔记_LinuxProbe笔记_05

LinuxProbe第五课笔记_LinuxProbe笔记_06

LinuxProbe第五课笔记_LinuxProbe笔记_07变量【 条件表达式 】中括号两边都有空格

逻辑与或非举例


LinuxProbe第五课笔记_LinuxProbe笔记_08

LinuxProbe第五课笔记_LinuxProbe笔记_09


LinuxProbe第五课笔记_LinuxProbe笔记_10


LinuxProbe第五课笔记_LinuxProbe笔记_11