A well known example of this is during World War I on the western front where both forces found themselves in static defensive positions in trenches that ran from the Swiss Alps to the English Channel. For years with any opportunity for maneuvers, the only way the commanders thought they could defeat the enemy was continually attack each other head on and grind other down.
If the sides are evenly matched or nearly so, the outcome of a War of Attrition may be a Pyrrhic Victory.