《LINUX教學(xué):Linux文本處理工具作業(yè)》要點:
本文介紹了LINUX教學(xué):Linux文本處理工具作業(yè),希望對您有用。如果有疑問,可以聯(lián)系我們。
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
本文永遠(yuǎn)更新鏈接地址:
《LINUX教學(xué):Linux文本處理工具作業(yè)》是否對您有啟發(fā),歡迎查看更多與《LINUX教學(xué):Linux文本處理工具作業(yè)》相關(guān)教程,學(xué)精學(xué)透。維易PHP學(xué)院為您提供精彩教程。
轉(zhuǎn)載請注明本頁網(wǎng)址:
http://www.snjht.com/jiaocheng/7032.html