A man was spotted wielding a knife near a Norfolk shopping centre.
Norwich Crown Court heard David Crosby, 41, was seen by a security guard arguing with a man on a bike near Market Gates shopping centre, Great Yarmouth.
Oliver Haswell, prosecuting, said Crosby was seen to wield a wooden-handled knife and saying "come on then" before the man cycled away and Crosby put the knife in his rear trouser pocket.
Mr Haswell said the security guard spoke to Crosby and watched him, before seeing him dump the knife in a nearby bin.
He then contacted police.
Mr Haswell said Crosby was arrested nearby and the knife was recovered.
Crosby, of Marine Parade, Great Yarmouth, admitted knife possession on March 17, and possessing cannabis on February 26.
The court heard had 17 convictions for 33 offences. This was his 4th conviction for having a knife.
Judge Anthony Bate jailed him for eight months.
Rob Pollington, for Crosby, said he deserved credit for his guilty pleas.
He said Crosby had a number of health problems and had to take regular medication.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here