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.