How to combine alternate lines in a file?
Clash Royale CLAN TAG #URR8PPP up vote 1 down vote favorite 2 I have a 4 line input file and i need to modify the file to combine alternate lines. I want to perform the operation in place. INPUT: Tom Nathan Jack Polo Desired Output: Tom Jack Nathan Polo One way is to collect odd numbered lines and flip them and cut even numbered lines and combine both files to get the final output. But i am looking for a simpler solution. text-processing awk sed paste share | improve this question asked Jan 12 at 19:55 ayrton_senna 492 2 4 16 add a comment  | up vote 1 down vote favorite 2 I have a 4 line input file and i need to modify the file to combine alternate lines. I want to perform the operation in place. INPUT: Tom Nathan Jack Polo Desired Output: Tom Jack Nathan Polo One way is to collect odd numbered lines and flip them and cut even numbered lines and combine both files to get the final output. But i am looking...