I want to join last column of the line with the next line first column. For example:
cat FILE
12 15
22 25
32 35
42 45
to join like this:
15 22
25 32
35 42
15
(last column) joined with 22
(first column of next line).
My solution is: tr '\n' '@' < FILE | tr '\t' '\n' | grep '@' | grep -v '@$' | tr '@' '\t'
But there might be simple awk
command to do this.