Charlie Bott, aged 24, of Stanley Road, Burncross, was on remand at HMP Doncaster, Marshgate, for seven weeks when he was attacked.
He had been locked up over criminal damage to a window, for which he eventually received an absolute discharge.
Details of the attack emerged when he appeared at Sheffield Crown Court this week over a street attack.
His barrister, Michael Cane-Soothill, said the attack in the shower block when he was locked up had been the catalyst for him to change his ways.
There have been a number of attacks on prisoners in South Yorkshire while they have been behind bars over the years.
Here are a selection of some of the incidents which have reached court.
6. HMP Lindholme
A South Yorkshire prisoner clubbed a fellow inmate over the back of this head with a chair leg.
Ade Christie attacked the fellow inmate without warning as he returned to his cell after collecting his lunch at HMP Lindholme on October 5, 2018.
His victim felt his ears pop and blood flow from his head, Sheffield Crown Court heard. He was taken to Doncaster Royal Infirmary, where seven staples were used to close the wound.
The court heard Christie had 18 previous convictions for 27 offences, including robbery, in 2000 and 2002, wounding in 2005, and battery in 2012.
In 2014, a conviction for actual bodily harm and robbery led to an extended sentence, and another conviction for a similar attack in 2015, while he was in prison, resulted in a 30-month sentence. He was serving that when the 2018 attack happened.
Christie, 39 when he was sentenced last year, pleaded guilty to wounding and had another two years and six months added to his sentence. Photo: Claire Lewis