The incident took place at flats located in Christchurch Road, Doncaster Town Centre just before midnight on May 13 this year, when residents came out of their properties after hearing Steven Singleton rowing loudly with his girlfriend.
Louise Gallagher, prosecuting, described how one neighbour was standing near to his front door when he heard someone coming up behind him, and when he turned around he saw Singleton standing there, holding a black kitchen knife .
She said: "The defendant said: 'Who's having it? Come on, let's go."
Following this, the court heard how the neighbour tried to calm Singleton down by telling him that no-one was going to beat him up, and proceeded to ask him what he was doing with a knife.
Singleton, who neighbours told police has a history of causing problems in the area, then went downstairs, where he made eye contact with another of the residents and said: "Right then, who's first?"
Police were called to the scene, and when they searched the property occupied by Singleton's girlfriend, they found the knife he had been holding on the sofa.
When interviewed by the police, Singleton, of Church Road, Barnby Dun admitted to holding the knife but said it was for his 'own protection' as he believed he was going to be attacked.
In victim impact statements read out in court, residents described how the attack had left them fearing for their lives.
One resident said: "At the time I was very frightened. The male can be very aggressive and violent. I feared for my life."
Another told police: "I thought he was capable of using the knife, I was scared."
Singleton was found guilty of a charge of affray, following a trial at Doncaster Magistrates' Court.
Defending, James Gould, described Singleton, aged 39, as someone who was 'troubled' and who was now willing to acknowledge his problems.
He told the court Singleton now hoped to turn his life around after being given a new job.
Recorder Jeremy Barnett sentenced Singleton to a 12 month community order, and ordered him to complete a 30 day rehabilitation activity requirement.
He said: "What you did on that night was clearly unacceptable. You literally frightened people who had no business with you at all."
He added: "This is your last chance, I suggest you take it with open arms.