I'm trying to figure out how to swap columns1 with column2 seperated by ':' with a SED expression.
Case example:
column1:column2
column1:column2
column1:column2
I'd like to change to this:
column2:column1
column2:column1
column2:column1
I tried the following, but it just outputs it with no change.
sed 's/\([^ ]*\)[ ][ ^C\([^ ]*\)/\2 \1/' test.txt > test1.txt
I would appreciate the help.