The sed way:
sed -E ' s/^(([ \t]*-?[ \t]*[0-9]+[ \t]+[0-9]+)*)[ \t]+-?[ \t]*[0-9]+/\1/; s/[0-9]+[ \t]+([0-9]+)/\1/g' Output:
-2 4 -9 3 -5 -11 The first expression kills the trailing column if there are an odd number of columns. It does that by looking for 0 or mode pairs <number> <number>, where the first number can be negative.