随笔分类 -  shell脚本

摘要:介绍 grep命令用于查找文件里符合条件的字符串。作为linux中最为常用的三大文本(awk,sed,grep)处理工具之一。 语法 grep [-abcEFGhHilLnqrsvVwxy][-A<显示列数>][-B<显示列数>][-C<显示列数>][-d<进行动作>][-e<范本样式>][-f<范 阅读全文
posted @ 2022-04-27 17:36 yuezenghui 阅读(325) 评论(0) 推荐(0)
摘要:[root@lnmp1 shell18]# cat serverinital.sh #!/bin/bash#Author:yzh#xxx#Time:2022-02-05 20:06:45#Name:serverinital.sh#Version:V1.0#Description:这是一个服务器初始化 阅读全文
posted @ 2022-02-05 20:12 yuezenghui 阅读(43) 评论(0) 推荐(0)
摘要:#!/bin/bashfor ((a=1;a<=9;a++))do for ((b=1;b<=9;b++)) do if [[ a -ge b ]];then echo -e -n "$b * $a = $[a*b]\t" fi done echo " "done 阅读全文
posted @ 2022-01-28 19:32 yuezenghui 阅读(278) 评论(0) 推荐(0)