sed: unterminated 's' command`

后端 未结 1 647
悲&欢浪女
悲&欢浪女 2020-12-12 02:42

I\'m writing a nice regex to replace some IP\'s in a text file.

sed -r \"s/[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}/${APP_IP}/g\" /path/to/my/file
         


        
相关标签:
1条回答
  • 2020-12-12 03:08

    SOLVED: Seems to be working when I set the variable $APP_IP manually to the IP under test. If I capture the variable from the output (of a ping) it gives the error. Must be special characters in the variable. Thanks guys.

    0 讨论(0)
提交回复
热议问题