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 ~]# 
相关推荐
绵羊20234 小时前
单细胞转录组测序上游——cellranger
linux
chinesegf4 小时前
Docker篇4-本地项目app.py与docker加载项目镜像的开发顺序
运维·docker·容器
CyreneSimon4 小时前
Docker 拉取配置教程:解决镜像拉取连接超时问题
运维·docker·容器
李子红了时5 小时前
【墨铺网教程】一台电脑加入多个局域网,让电脑做上传下载主力又当存储盘
运维·服务器·电脑
Awkwardx6 小时前
Linux系统编程—线程同步与互斥
linux·服务器
snpgroupcn7 小时前
Adobe SAP S/4HANA 升级实践:企业规模化转型关键要素
运维·adobe·云计算
赖small强7 小时前
[Linux]内核队列实现详解
linux·kfifo·请求队列·工作队列(workqueue)·等待队列·kfifo_init
www.029 小时前
linux服务器升级显卡驱动(笔记)
linux·运维·服务器·笔记·ubuntu·服务器环境
Linux-palpitate9 小时前
基于Prometheus和Grafana的MySQL监控,服务器监控
服务器·grafana·prometheus
Yeats_Liao9 小时前
Go Web 编程快速入门 13 - 部署与运维:Docker容器化、Kubernetes编排与CI/CD
运维·前端·后端·golang