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