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 ~]# 
相关推荐
|华|8 分钟前
GFS 分布式文件系统
linux
yyk的萌22 分钟前
Claude Code 命令大全
linux·运维·服务器·ai·claude code
Fanfanaas27 分钟前
Linux 系统编程 进程篇(五)
linux·服务器·c语言·网络·学习·进程
Sirius Wu29 分钟前
Docker 镜像的构建、打包、变更、再次打包全流程
运维·docker·容器
开源盛世!!38 分钟前
4.20-4.22
java·服务器·开发语言
代码论斤卖41 分钟前
OpenHarmony teecd频繁崩溃问题分析
linux·harmonyos
Harvy_没救了1 小时前
【Linux】Nginx - 反向代理
linux·运维·nginx
代码中介商1 小时前
Linux 静态库与共享库完全指南:从制作到使用
linux·运维·服务器
"小夜猫&小懒虫&小财迷"的男人1 小时前
【Linux v7.0 以太网驱动+协议栈】000 - 文章链接汇总
linux·网络
铭keny1 小时前
【Ubuntu部署】人脸特征提取SDK完整部署教程(含Nginx代理+问题排查)
linux·nginx·ubuntu