sed - Executing edits in parallel rather than sequentially -


i want apply large number of edits file in parallel. don't want subsequent edit commands modify modified lines if pass through sed pattern space.

any tips?

this might work (gnu sed):

sed 's/fred/wilma/g;t;s/wilma/betty/g' file 

use fact substitution has taken place way of preventing further substitutions on line. t command bail out if substitution has succeeded.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -