fork download
  1. #!/bin/bash
  2. sed '/location \/test\/v2\.0\.0/,/}/ s/\(proxy_pass http:\/\/10.1.0.6:\)[0-9]*;/\15555;/'
Success #stdin #stdout 0.01s 5276KB
stdin
server {
    location /test/v2.0.3 {
        modsecurity on;
        proxy_pass http://10.1.0.6:3000;
    }
    location /test/v2.0.0 {
        modsecurity on;
        proxy_pass http://10.1.0.6:3000;
    }
}
stdout
server {
    location /test/v2.0.3 {
        modsecurity on;
        proxy_pass http://10.1.0.6:3000;
    }
    location /test/v2.0.0 {
        modsecurity on;
        proxy_pass http://10.1.0.6:5555;
    }
}