A homeless man who was caught with a knife became aggressive when he was confronted by police, Lincoln Crown Court was told.
Adam Herbert attracted the attention of door staff as he left the Castaway Bar in Skegness after he dropped the eight-inch bladed “Rambo-style” weapon.
Leanne Summers, prosecuting, said that Herbert was seen to pick up the knife and push it into his shorts. He apologised to the door staff and walked off.
Police were contacted and when an officer approached Herbert he appeared unsteady on his feet and looked drunk.
Herbert gave a false name and then after being arrested he attempted to headbutt the officer.
He was taken into police custody but went on to smear his cell with excrement.
Miss Summers told the court: “The following day he did the same thing but this time he also smeared it over his face.”
The court was told that Herbert has 54 previous convictions for a total of 109 offences. He is currently back in jail having been recalled to complete a previous sentence from which he was given early release.
Herbert, 23, of no fixed address, admitted possession of a bladed article on July 21 this year. He also admitted two charges of damaging a police cell on July 21 and 22 and breach of a conditional discharge imposed for a public order offence.
He was jailed for a total of 10 months.
Herbert, who represented himself, said he had been living on the streets from the time he was last released from prison.
He told the court “They set me up to fail. I’m just in a failing system. I want help. I want to change my life.”