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 ~]# 
相关推荐
s6516654967 分钟前
Linux内核学习-汇编笔记
linux
IMPYLH8 分钟前
Linux 的 csplit 命令
linux·运维·服务器·数据库
cccyi713 分钟前
支持 HTTP 协议的主从 Reactor 高性能服务器组件
服务器·http·reactor
钰衡大师14 分钟前
Nohup 使用技术文档
linux·服务器·运维开发·unix
Sakuyu4346815 分钟前
zabbix源码安装
linux·运维·zabbix
赖亦无28 分钟前
【水动力学】06 Linux + Conda 环境下源码编译安装 pypims (CUDA加速) 避坑指南
linux·运维·conda·pypims·水动力学
穷人小水滴35 分钟前
使用 WebRTC 实现局域网投屏: PC (GNOME ArchLinux) -> 平板 (Android)
android·linux·webrtc·浏览器·js·gnome·投屏
恋红尘37 分钟前
K8S 控制器-资源调度-叩丁狼
linux·docker·kubernetes
weixin_5375904538 分钟前
《C程序设计语言》练习答案(练习1-7)
linux·c语言·算法
123过去3 小时前
ike-scan使用教程
linux·测试工具