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 ~]# 
相关推荐
章老师说20 分钟前
BFE v1.8.3 正式发布:AI网关能力再升级,企业级七层负载均衡持续进化
运维·人工智能·负载均衡
星释8 小时前
鸿蒙智能体开发实战:23.常见问题
服务器·华为·ai·harmonyos·鸿蒙·智能体
天空'之城8 小时前
Linux 系统编程 22:五种 IO 模型全解
linux
小张成长计划..9 小时前
【Linux】10:冯·诺依曼体系结构和操作系统
linux·运维·服务器
悦儿遥遥雨112 小时前
PXE + Kickstart 无人值守批量部署系统
linux·javascript·nginx
m0_5648768413 小时前
没有公网IP的情况下,怎么进行远程连接两个电脑
服务器·tcp/ip·负载均衡
Imagine Miracle13 小时前
【WSL】让WSL2后台持久运行不自动关闭的解决方案
linux·windows·wsl
兔C13 小时前
Linux 命令行入门学习资料 day_2
linux·运维·服务器
eggcode14 小时前
Linux命令基础与操作技巧
linux
多巴胺梦想家14 小时前
事务与并发控制:当多人同时操作数据库
服务器·数据库·oracle