Sed – match something, then change something else

Here’s a useful feature of sed, the linux stream editor, that I didn’t know about before. My problem was that within a file, I wanted to only operate on lines that contained a certain expression – but leaving that expression intact and instead changing another expression on that line. The standard sed command for replacing […]