Help with SED in Ubuntu
I want to SED a file. That file contains many lines. There is a two-possibilities string I want to replace:
In both cases I want to replace what occurs between // and /.
What I’m trying:
sed -i "s;//([^/]+)/;//$VAR/; " /path/file
This only works for scenario 2. I already have a second sed line in place to brute force replace /// whenever it occurs, but I would love to have it in a single command if possible.