I have a pipe delimited file like this where the second column is the key that groups the ids in the first column.
456566|23233|
456545|23233|
456745|23233|
456456|23234|
456356|23234|
I am trying to create a file like this where the first id gets repeated based on the id in the second field and remaining ids for that group in the second column. I am would like to learn how to do this using any utilities like awk
output
456566|456545
456566|456745
456456|456356