Skip to main content
2 of 5
edited tags
Kusalananda
  • 355.7k
  • 42
  • 735
  • 1.1k

Check if the 2nd and the 3rd columns are repeating, print the first element in 5th and the last element in 6th column

The thing I wanna do is to check if the 2nd and the 3rd columns are repeating, print the first element in 5th and the last element in 6th column with their corresponding 4th column.

Example input looks like this:

enter image description here

Desired output looks like this:

enter image description here

Thanks!