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 分钟前
控制算法:PP(纯跟踪)算法
linux·人工智能·驱动开发·算法·机器学习
HABuo28 分钟前
【Linux进程(四)】进程切换&环境变量深入剖析
linux·运维·服务器·c语言·c++·ubuntu·centos
oMcLin43 分钟前
如何在 Rocky Linux 8.7 上通过 Prometheus 与 Grafana 结合,提升大规模容器环境的监控与性能分析?
linux·grafana·prometheus
橘颂TA43 分钟前
【Linux】死锁四条件的底层逻辑:从锁冲突到 STL 组件的线程安全实践(Ⅵ)
linux·运维·服务器·c++·死锁
埃伊蟹黄面1 小时前
ELF深入解剖:从文件头到动态段,图解库的二进制构成
linux·c·
五仁火烧1 小时前
生产环境中配置了接口3000后,不能启动,改成8080后就可以
linux·网络·安全·vue
黄焖鸡能干四碗1 小时前
智能制造工业大数据应用及探索方案(PPT文件)
大数据·运维·人工智能·制造·需求分析
JiMoKuangXiangQu1 小时前
Linux build:头文件安装
linux·headers_install
橙露1 小时前
国产PLC与进口PLC全面对比分析:技术、市场与未来趋势
运维·网络
lbb 小魔仙2 小时前
【Linux】云原生运维效率提升:Linux 终端工具链(kubectl + tmux + fzf)组合拳教程
linux·运维·云原生