sd icon indicating copy to clipboard operation
sd copied to clipboard

Multiple replace operations in one go

Open blueray453 opened this issue 4 years ago • 2 comments

How to run multiple replace in one go. For example, sed -i 's/foo/bar/g; s/baz/zab/g; s/Alice/Joan/g' file

How to replace multiple patterns with the same string. For example, Replace any of foo, bar or baz with foobar. In sed the command looks like: sed -Ei 's/foo|bar|baz/foobar/g' file

blueray453 avatar Sep 07 '21 07:09 blueray453

Yes, any option to add those on the command line or get the replacement patterns from a file? Would be handy, and I assume from a performance point of view more efficient?

ksandvik avatar Dec 23 '21 23:12 ksandvik

duplicate of #133

milahu avatar Jan 14 '22 18:01 milahu

Trying to organize the issues more, so I'll be closing this as a duplicate of #133

CosmicHorrorDev avatar Oct 22 '23 00:10 CosmicHorrorDev