sed is printing a substituted line twice

前端 未结 2 1904
执笔经年
执笔经年 2021-01-14 07:52

I am running the following command:

find /home/debajdas/checkout -name \'pom.xml\' -or -name \'*.properties\' | xargs sed -i \'s/10.0.0.0.3/10.0.0.0.4/gpw ch         


        
相关标签:
2条回答
  • 2021-01-14 08:20

    You must remove 'p' that prints current pattern space.

    sed -i 's/10\.0\.0\.0\.3/10.0.0.0.4/gw changes'
    
    0 讨论(0)
  • 2021-01-14 08:22

    GNU sed

    sed -i 's/\.3/.4/w changes'
    
    0 讨论(0)
提交回复
热议问题