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 ~]# 
相关推荐
wqqqianqian1 分钟前
国产linux系统(银河麒麟,统信uos)使用 PageOffice 在线打开Word文件,并用前端对话框实现填空填表
linux·前端·word·pageoffice
清风来点灯18 分钟前
Ubuntu22.04安装显卡驱动/卸载显卡驱动
linux·笔记·ubuntu
qrh_yogurt42 分钟前
搭建spark伪分布集群
大数据·服务器·spark
还有几根头发呀1 小时前
深入理解 TCP:重传机制、滑动窗口、流量控制与拥塞控制
服务器·网络
吴爃1 小时前
linux搭建hadoop学习
linux·hadoop·学习
海尔辛2 小时前
学习黑客Linux Flags and Switches 入门
linux·运维·学习
程序边界2 小时前
RPA与After Effects 2024深度融合:自动化影视特效全链路革命
运维·自动化·rpa
檀越剑指大厂2 小时前
【Linux系列】跨平台安装与配置 Vim 文本编辑器
linux·运维·vim
小妖6662 小时前
vue2 provide 后 inject 数据不是响应式的,不实时更新
java·服务器·前端
11054654012 小时前
3、食品包装控制系统 - /自动化与控制组件/food-packaging-control
运维·信息可视化·自动化