zoukankan      html  css  js  c++  java
  • 文本处理工具作业

     1,[root@centos7 data]# ifconfig ens33 | grep netmask|tr -s " " |cut -d " " -f3
      192.168.3.234
    2,[root@centos7 data]# df -Th | tr -s " " | cut -d " " -f6|tr -d % | sort -rn | head -n1
      17
    3,[root@centos7 data]# cat /etc/passwd |cut -d: -f 1,3,7 | sort -t : -rnk 2 | head -1
      nfsnobody:65534:/sbin/nologin
    4,[root@centos7 /]# ll -d /tmp/
      drwxrwxrwt. 33 root root 4096 Oct 25 10:22 /tmp/
      777
    5,[root@centos7 ~]# netstat -nt | tr -s " " : | cut -d : -f6 | uniq -c |sort -nr
          4 192.168.3.1
          1 Foreign
          1

    1,[root@centos7 home]# cat /proc/meminfo | grep -i ^s

    2,[root@centos7 home]# cat /etc/passwd | grep -v "(/bin/bash)$"

    3,[root@centos7 home]# cat /etc/passwd | grep "<rpc>" | cut -d: -f7
      /sbin/nologin
    4,[root@centos7 home]# cat /etc/passwd | grep -o "[0-9]{2,3}"

    5,[root@centos7 home]# cat /etc/grub2.cfg | grep "^[[:space:]]+"

    6,cat /etc/grub2.cfg | grep "^[[:space:]].*[^[:blank:]]$"

    7,cat /etc/passwd | cut -d : -f 1,3|sort -t : -nk 2 | head -42

    8,grep "(^.+):.*<1$" /etc/passwd

    9,df -Th | grep ^"/dev" | tr -s " " % | cut -d % -f 6 |sort -n

      

  • 相关阅读:
    Node buffer模块缓冲区
    Node url模块
    Node querystring
    Node fs模块同步读取写入追加
    Linux Shell 量的自增
    Compare, sort, and delete duplicate lines in Notepad ++
    PL SQL 基础
    Oracle alter table modify column Syntax example
    Oracle to_char格式化函数
    oracle to_char FM099999
  • 原文地址:https://www.cnblogs.com/wangyanqiang/p/11736568.html
Copyright © 2011-2022 走看看