linux扩展正则表达式之+

1.+含义

linux扩展正则表达式+表示重复"一个或一个以上"的字符。

2.样例

命令:

grep -En "bo+t" anaconda-ks.cfg

OR

egrep -n "bo+t" anaconda-ks.cfg

#搜索含有(bot)、(boot)、(booot)等字符串的行,o+表示"一个以上的o"。

复制代码
[root@elasticsearch ~]# grep -En "bo+t" anaconda-ks.cfg 
8:# Run the Setup Agent on first boot
9:firstboot --enable
17:network  --bootproto=static --device=ens32 --gateway=172.20.10.1 --ip=172.20.10.11 --nameserver=172.20.10.1 --netmask=255.255.255.240 --ipv6=auto --activate
26:# System bootloader configuration
27:bootloader --location=mbr --boot-drive=sda
28:bootloader --location=mbr --boot-drive=sda
29:boootloader --location=mbr --boot-drive=sda
30:booootloader --location=mbr --boot-drive=sda
[root@elasticsearch ~]# 
[root@elasticsearch ~]# egrep -n "bo+t" anaconda-ks.cfg 
8:# Run the Setup Agent on first boot
9:firstboot --enable
17:network  --bootproto=static --device=ens32 --gateway=172.20.10.1 --ip=172.20.10.11 --nameserver=172.20.10.1 --netmask=255.255.255.240 --ipv6=auto --activate
26:# System bootloader configuration
27:bootloader --location=mbr --boot-drive=sda
28:bootloader --location=mbr --boot-drive=sda
29:boootloader --location=mbr --boot-drive=sda
30:booootloader --location=mbr --boot-drive=sda
[root@elasticsearch ~]# 
相关推荐
weixin_307779131 分钟前
Jenkins GitHub插件1.45.0:深度集成与实践指南
运维·云原生·云计算·jenkins
_dindong6 小时前
Linux网络编程:结合内核数据结构详谈epoll的工作原理
linux·服务器·网络
了一梨6 小时前
在Ubuntu中配置适配泰山派的交叉编译环境
linux·c语言·ubuntu
buyutang_6 小时前
Linux网络编程:Socket套接字编程概念及常用API接口介绍
linux·服务器·网络·tcp/ip
小小哭包6 小时前
Nginx配置文件nginx.conf中文详解
运维·nginx
weixin_431697206 小时前
onlyoffice预览nginx代理的静态文件
运维·nginx
杨云龙UP6 小时前
从0搭建Oracle ODA NFS异地备份:从YUM源到RMAN定时任务的全流程
linux·运维·数据库·oracle
DN金猿6 小时前
恢复 Linux 上误删除的文件
linux·运维·服务器
6***A6637 小时前
Nginx 反向代理配置
运维·nginx
远瞻。7 小时前
【环境配置】Ubuntu系统安装cuda
linux·运维·ubuntu