I have a file named ip-list with two columns:
ip-list
IP1 Server1 IP2 Server2
And I want to produce:
perl -pi -e 's/^([^\t]+)\t([^\t]+)$/\2\t\1/' yourfile.csv
perl -pi -e 'split("\t"); print "$_[1]\t$_[0]"'
The first one probably works on sed, too.
sed