
shell脚本
不会测试的开发不是好运维
这个作者很懒,什么都没留下…
展开
-
shell编程—语句
语句、原创 2018-05-29 22:48:08 · 360 阅读 · 0 评论 -
shell—变量
一、变量理解原创 2018-05-29 22:45:53 · 240 阅读 · 0 评论 -
linux—shell中的正则表达式
一、grep 1、grep概述 文本过滤命令:grep是一种文本搜索工具,根据用户指定的“模式”对目标文本进行匹配检查,打印匹配到的行; grep:由正则表达式或者字符及基本文本字符所编写的过滤条件; 2、grep匹配字符 -E 拓展正则表达式 grep root passwd 查找包含root的关键词 ...原创 2018-05-21 22:04:14 · 1075 阅读 · 0 评论 -
shell—中常用命令
一、diff命令 比较文件差异 1、对比两个文件的不同 [root@localhost mnt]# cat file1 1 2 3 4 5 [root@localhost mnt]# cat file2 1 2 3 4 5 6 [root@localhost mnt]# diff file1 file2 5a6 > 6 2、生成补丁 [root@localhost mn...原创 2018-05-17 21:34:52 · 422 阅读 · 0 评论 -
shell—脚本语言理解
一、脚本的调用 脚本调用有两种方式 方法一: [root@localhost mnt]# sh westos.sh hello 方法二: [root@localhost mnt]# chmod +x westos.sh [root@localhost mnt]# /mnt/westos.sh hello 二、脚本的检查 方法一: [root@localhost m...原创 2018-05-15 22:59:37 · 156 阅读 · 0 评论 -
shell脚本练习题
1、猜数字游戏 系统随机给出一个数,猜大小, #!/bin/bash echo "可以输入q或者quit退出!" a=$[RANDOM%100+1] while : do read -p "请输入一个1-100之间的整数:&原创 2019-02-25 22:14:41 · 1352 阅读 · 0 评论