[Python] Pair data located in the same string, AWK or other [closed]

Discussão em 'Python' iniciado por Stack, Fevereiro 8, 2025.

  1. Stack

    Stack Membro Participativo

    I have a file with strings like this

    1A,1B,1C, 2A,2B,2C,


    between the group "1" and the group "2" there is a tab (each string has a different number of elements inside the file); I would need to pair the "A", "B", and "C", and move each pair in a new line; for e.g.

    1A-2A
    1B-2B
    1C-2C


    I was looking with AWK or Bash, but I can not come out.

    Continue reading...

Compartilhe esta Página