美文网首页
Linux----sed方法实现精准匹配

Linux----sed方法实现精准匹配

作者: 不过意局bugyj | 来源:发表于2018-11-10 11:46 被阅读0次

    参考https://blog.csdn.net/chenxieyy/article/details/52919009

    类似于

    sed  -i 's/n/en/g' text.txt
    

    sed默认是包含n的行就行
    我们可以写成

    sed  -i 's/\<n\>/en/g' text.txt
    

    实现精准匹配,匹配单个字母 n

    相关文章

      网友评论

          本文标题:Linux----sed方法实现精准匹配

          本文链接:https://www.haomeiwen.com/subject/vddzxqtx.html