zoukankan      html  css  js  c++  java
  • grep' '

    单词锁定符,如: 'grep'只匹配grep
    
    [root@86 ttf-arphic-uming-0.0.20050501]# cat /proc/diskstats
       1       0 ram0 0 0 0 0 0 0 0 0 0 0 0
       1       1 ram1 0 0 0 0 0 0 0 0 0 0 0
       1       2 ram2 0 0 0 0 0 0 0 0 0 0 0
       1       3 ram3 0 0 0 0 0 0 0 0 0 0 0
       1       4 ram4 0 0 0 0 0 0 0 0 0 0 0
       1       5 ram5 0 0 0 0 0 0 0 0 0 0 0
       1       6 ram6 0 0 0 0 0 0 0 0 0 0 0
       1       7 ram7 0 0 0 0 0 0 0 0 0 0 0
       1       8 ram8 0 0 0 0 0 0 0 0 0 0 0
       1       9 ram9 0 0 0 0 0 0 0 0 0 0 0
       1      10 ram10 0 0 0 0 0 0 0 0 0 0 0
       1      11 ram11 0 0 0 0 0 0 0 0 0 0 0
       1      12 ram12 0 0 0 0 0 0 0 0 0 0 0
       1      13 ram13 0 0 0 0 0 0 0 0 0 0 0
       1      14 ram14 0 0 0 0 0 0 0 0 0 0 0
       1      15 ram15 0 0 0 0 0 0 0 0 0 0 0
       7       0 loop0 0 0 0 0 0 0 0 0 0 0 0
       7       1 loop1 0 0 0 0 0 0 0 0 0 0 0
       7       2 loop2 0 0 0 0 0 0 0 0 0 0 0
       7       3 loop3 0 0 0 0 0 0 0 0 0 0 0
       7       4 loop4 0 0 0 0 0 0 0 0 0 0 0
       7       5 loop5 0 0 0 0 0 0 0 0 0 0 0
       7       6 loop6 0 0 0 0 0 0 0 0 0 0 0
       7       7 loop7 0 0 0 0 0 0 0 0 0 0 0
     202       0 xvda 82523 258 2428188 331412 316952 778724 8778096 9298675 0 325192 9630429
     202       1 xvda1 82359 258 2426876 331278 316952 778724 8778096 9298675 0 325058 9630295
    

     注意配置一个单词的意思是不会包括数字的的一串字母!!!!

    [root@86 ttf-arphic-uming-0.0.20050501]# cat /proc/diskstats|grep -E "sd[a-z]|xvd[a-z]"
     202       0 xvda 82571 258 2428572 331629 319518 779539 8805144 9310801 0 327449 9642771
    
    [root@86 ttf-arphic-uming-0.0.20050501]# cat /proc/diskstats|grep -E "sd[a-z]|xvd[a-z]"|awk '{print $3}'
    
  • 相关阅读:
    super关键字
    aspcms 留言 搜索
    aspcms标签
    随机添加一个Class,Class提前写好
    python实现进度条
    linux 下获取文件名的md5值
    linux下 批量压缩与批量解压
    linux下批量新建/删除 文件或目录
    python——pip导出导入安装包
    python Scrapy爬虫框架
  • 原文地址:https://www.cnblogs.com/bass6/p/5523654.html
Copyright © 2011-2022 走看看