亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: 如何去除mac地址前面的零 [打印本頁]

作者: hazhuyg    時(shí)間: 2016-09-07 01:51
標(biāo)題: 如何去除mac地址前面的零
假使a=00:ae:0d:ee:02:03如何實(shí)現(xiàn)將a=0:ae:d:ee:2:3


作者: yinyuemi    時(shí)間: 2016-09-07 08:05
回復(fù) 1# hazhuyg

sed 's/0\([0-9]\)/\1/g'


作者: moperyblue    時(shí)間: 2016-09-07 08:23

  1. sed 's/0\B//g'
  2. sed 's/\b0//g'
復(fù)制代碼

作者: jcdiy0601    時(shí)間: 2016-09-07 09:01
  1. echo "00:ae:0d:ee:02:03"|sed 's/0\([0-9a-zA-Z]\)/\1/g'
復(fù)制代碼

作者: 99超人    時(shí)間: 2016-09-07 09:21
提示: 作者被禁止或刪除 內(nèi)容自動屏蔽
作者: sunzhiguolu    時(shí)間: 2016-09-07 10:17
  1. perl -e 'print "00:ae:0d:ee:02:03"=~s/\b0//gr'
復(fù)制代碼

0:ae:d:ee:2:3
作者: 杰瑞26    時(shí)間: 2016-09-10 09:51
  1. root@localhost:~# echo "a=00:ae:0d:ee:02:03" | sed -r 's:0([0-9A-Za-z]):\1:g'
  2. a=0:ae:d:ee:2:3
復(fù)制代碼

作者: hazhuyg    時(shí)間: 2016-09-14 09:54
回復(fù) 3# moperyblue

\B表示什么
作者: moperyblue    時(shí)間: 2016-09-14 10:44
回復(fù) 8# hazhuyg

可以百度它

info sed

=>

`\B'
     Matches everywhere but on a word boundary; that is it matches if
     the character to the left and the character to the right are
     either both "word" characters or both "non-word" characters.





歡迎光臨 Chinaunix (http://www.72891.cn/) Powered by Discuz! X3.2