【shell】打印行号的8种方法【面试题】
cat -n oldboy.txtnl oldboy.txtless -N nginx.confvi oldboy.txt set nugrep -n “. “ oldboy.txtgrep -n “. *“ oldboy.txtawk ‘{print NR” “$0}’ oldboy.txtsed ‘=’ /etc/rsyslog.confvi 文件后 输入:set number也可以显示行号
cat -n oldboy.txtnl oldboy.txtless -N nginx.confvi oldboy.txt set nugrep -n “. “ oldboy.txtgrep -n “. *“ oldboy.txtawk ‘{print NR” “$0}’ oldboy.txtsed ‘=’ /etc/rsyslog.confvi 文件后 输入:set number也可以显示行号