《LINUX教学:Linux文本处理工具作业》要点:
本文介绍了LINUX教学:Linux文本处理工具作业,希望对您有用。如果有疑问,可以联系我们。
1 办法一:cat /proc/meminfo |grep -i ^s 2 办法二:cat /proc/meminfo |grep ^[sS]
1 cat /etc/passwd | grep -v /bin/bash
1 cat /etc/passwd |grep "\b[0-9]\{2,3\}\b"
1 cat /etc/grub2.cfg |egrep "^[[:space:]]+[[:graph:]].*"
1 netstat -tan |grep "LISTEN[[:space:]]\+$"
1 办法一:getent passwd |cut -d: -f1,3 |grep -v root |grep "\b[[:digit:]]\{1,3\}\b$" 2 办法二:getent passwd |cut -d: -f1,3 |grep -ve root -e "\b[[:digit:]]\{4,\}\b"
1 cat /etc/passwd |grep -o "^\(.\+\b\).*\b\1$"
1 df |grep sd |grep -Eo "[0-9]{1,3}%" |sort -nr
1 cat /etc/passwd |egrep "^(root|mage|wang)\b" |cut -d: -f3,7
1 办法一:cat /etc/rc.d/init.d/functions |grep -o "^.*[[:graph:]]()" 2 办法二:cat /etc/rc.d/init.d/functions |egrep "^.*[^[:space:]]\(\)" 3 办法三:cat /etc/rc.d/init.d/functions |egrep -o "^.*\>\(\)"
1 echo /etc/rc.d/init.d/functions | egrep -o "[^/]+/?$"
1 办法一:echo /etc/rc.d/init.d/functions | egrep -o "^/.*/\b" 2 办法二:echo /etc/rc.d/init.d/functions |egrep -o ".*/." |egrep -o ".*/" /etc/rc.d/init.d/
1 last |grep ^root |egrep -o "([0-9]{1,3}\.){3}[0-9]{1,3}" |sort |uniq -c
1 \b[0-9]\b 0-9 2 \b[0-9]{2}\b 10-99 3 \b[1][0-9]{2}\b 100-199 4 \b[2][0-4][0-9]\b 200-249 5 \b[2][5][0-5]\b 250-255
1 ifconfig | egrep -o "\<(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4]0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\>"
1 echo "welcome to magedu linux" |grep -o "." |sort |uniq -c |sort -nr
本文永远更新链接地址:
《LINUX教学:Linux文本处理工具作业》是否对您有启发,欢迎查看更多与《LINUX教学:Linux文本处理工具作业》相关教程,学精学透。维易PHP学院为您提供精彩教程。
转载请注明本页网址:
http://www.vephp.com/jiaocheng/7032.html