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 ~]# 
相关推荐
Watermelo6172 分钟前
【简单快速】windows中docker数据如何从C盘迁移到其他盘
java·运维·docker·容器·运维开发·devops·空间计算
james bid3 分钟前
MacBook Pro 2015 上 XUbuntu 24.04 启用 eGPU (GeForce GTX 1080 Ti) 和核显黑屏问题解决
linux·ubuntu·macos·cuda·egpu
龙吟游戏3 分钟前
Ubuntu Server 25.10安装
linux·运维·ubuntu
zzxxlty5 分钟前
windows 迁移ubuntu wsl从C盘到D盘
linux·运维·ubuntu
ouliten10 分钟前
《Linux C编程实战》笔记:mmap
linux·c++·笔记
呆萌小新@渊洁10 分钟前
Linux离线环境安装ffmpeg
linux·ffmpeg·php
梦想的旅途213 分钟前
Hook技术与内存注入在企业微信外部群数据获取中的技术与风险分析
linux·运维·服务器
咕噜签名-铁蛋16 分钟前
数据洪流时代的存储革命:从磁带到云原生的进化之路
服务器
robator25 分钟前
ubuntu 22.04 升级nvidia显卡驱动、cuda 和cudnn
linux·服务器·ubuntu
肖恭伟39 分钟前
Pycharm历史community版本下载
linux·ubuntu·pycharm·下载·community