摘要: 扩展正则表达式1.显示三个用户root,cisco,ccnp的UID和默认shell (普通正则表达式与扩展正则表达式)[17:27:08 root@localhost data]#cat /etc/passwd |grep '^root\b\|^ccnp\b\|^cisco\b' |cut -d: 阅读全文
posted @ 2020-05-04 14:49 HRAS 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 1.显示/proc/meminfo文件中以大小s开头的行(要求两种方法)cat /proc/meminfo | grep '^[sS]'cat /proc/meminfo | grep '^s\|^S' 2.显示/etc/passwd文件中不以/bin/bash结尾的行cat /etc/passwd 阅读全文
posted @ 2020-05-04 11:27 HRAS 阅读(588) 评论(0) 推荐(0) 编辑