I have a file that for example says:Aa Bb C Y... TO BbCc Z J >> sd TO DdEe Z H S DFF TO FfBut I want it like that:Bb TO Aa Bb C Y... Dd TO Cc Z J >> sd Ff TO Ee Z H S DFFSo I can swap the Texts aroud the TO...
swapping words with awk around a symbol/text (to)
text processing;awk
try:awk -F \TO\  '{print $2  \TO\  $1}' yourfile