sed deux motifs

sed 's/ab/~~/g; s/bc/ab/g; s/~~/bc/g'
Smoggy Seal