Skip to main content
2 of 2
added 35 characters in body; edited tags
terdon
  • 252.3k
  • 69
  • 480
  • 718

How to print first column of next line in current line?

I have some file like this :

abc 123    
abc 789  
bcd 456  
acb 135

I would like to print first column of next line in current line.

Desired output:

abc  123 abc  
abc 789 bcd  
bcd 456 acb  
acb 135 

I prefer to use awk.

user2905046
  • 305
  • 1
  • 4
  • 10