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 ~]# 
相关推荐
撰卢4 分钟前
【个人笔记】负载均衡
运维·笔记·负载均衡
Shartin29 分钟前
Can201-Introduction to Networking: Application Layer应用层
服务器·开发语言·php
lilian12943 分钟前
linux系统mysql性能优化
linux·运维·mysql
共享家95271 小时前
linux_线程概念
linux·开发语言·jvm
apihz1 小时前
VM虚拟机全版本网盘+免费本地网络穿透端口映射实时同步动态家庭IP教程
android·服务器·开发语言·网络·数据库·网络协议·tcp/ip
乌云暮年2 小时前
Linux常用命令
linux·服务器·ssh·php
weixin_516023072 小时前
Geant4 安装---Ubuntu
linux·运维·ubuntu
稀液蟹-plus2 小时前
zynq-PS篇——bperez77中DMA驱动注意事项
linux·fpga
wanhengidc2 小时前
企业选择大带宽服务器租用的原因有哪些?
运维·服务器
罗技1232 小时前
用Filebeat OSS 7.10.2将收集日志到Easysearch
运维·es