Article 5E9XK [SOLVED] use sed to swap text in a string (not replace)

[SOLVED] use sed to swap text in a string (not replace)

by
Gebby_3
from LinuxQuestions.org on (#5E9XK)
I would like to swap text by using " - " as the swap position and send output of the swapped line.
There are multiple lines to search thru and swap.
There is only 1 occurrence of " - " in each line and of course different positions according to the length of each.

ex Input line:
Group Name - Song Title

ex Output line:
Song Title - Group Name

sed (condition statements) input file > output file

I am using cgywin, windows 10, mks toolkit and tcc by j.p.softwarelatest?d=yIl2AUoC8zA latest?i=B_yEls813w8:esqECtA5Fb8:F7zBnMy latest?i=B_yEls813w8:esqECtA5Fb8:V_sGLiP latest?d=qj6IDK7rITs latest?i=B_yEls813w8:esqECtA5Fb8:gIN9vFwB_yEls813w8
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments