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 ~]# 

相关推荐

  1. linux扩展表达式+

    2024-04-03 08:30:05       39 阅读
  2. linux扩展表达式?

    2024-04-03 08:30:05       40 阅读
  3. linux扩展表达式()

    2024-04-03 08:30:05       42 阅读
  4. linux表达式^

    2024-04-03 08:30:05       56 阅读
  5. linux表达式*

    2024-04-03 08:30:05       40 阅读
  6. linux表达式\{n,m\}

    2024-04-03 08:30:05       53 阅读
  7. linux 脚本 表达式

    2024-04-03 08:30:05       57 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-03 08:30:05       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-03 08:30:05       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-03 08:30:05       87 阅读
  4. Python语言-面向对象

    2024-04-03 08:30:05       96 阅读

热门阅读

  1. JVM中一次完整的 GC 流程

    2024-04-03 08:30:05       44 阅读
  2. 2023年网络安全领域新兴技术的发展特点

    2024-04-03 08:30:05       36 阅读
  3. RCE(远程命令执行)漏洞详解

    2024-04-03 08:30:05       39 阅读
  4. npm常用命令详解

    2024-04-03 08:30:05       33 阅读
  5. Github 2024-04-02开源项目日报Top10

    2024-04-03 08:30:05       39 阅读
  6. ElasticSearch的常用数据类型

    2024-04-03 08:30:05       39 阅读