Replace matching nth occurence

Hi
for eg my file has:

val1 | val2 | val1 | val2 | val1 | val2 | val1 | val2 |

here i need to replace '|' with '|\n' where the occurence of '|' is divisble by 2
so that the output comes like this
val1 | val2 |
val1 | val2 |
val1 | val2 |
val1 | val2 |

Requesting suggestions in awk or sed

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Proceed here:

Thank You.

The UNIX and Linux Forums.