In my file input.txt, I want to replace A->B, B->C, and C->A
i.e. I want to run
s/A/B/g;
s/B/C/g;
s/C/A/g;
However, I don’t want the patterns to operate on the new text
i.e. if I run the above sed script, A becomes unchanged A->B->C->A, and B goes to A (B->C->A)
Is there a way to do the replacements I want?
Thanks
There might be a better way, but if there are suitable X and Y not in your input.txt you could try: