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