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
Post a Comment