Sheffield Crown Court was told how at around 2.45am on July 23 last year, bouncers at The Harley in Glossop Road, bouncers pulled Carl Buckley to one side and asked him to come with them.
The bouncers had observed Buckley, aged 23, acting in a 'loud' and drunken manner, and led him out to the back entrance of the city centre bar.
Prosecutor Andrew Smith told the court: "Mr Buckley was asked to leave the bar area, and when spoken to the defendant became aggressive.
"He produced a silver locking knife. The police were called. When they arrived he was being restrained by the bouncers."
The court was told how Buckley, of Mawfa Crescent, Norton had recently become a dad for the second time and was trying to turn his life around.
Handing Buckley a sentence of eight months in prison, suspended for a year, Recorder Anthony Kelbrick told Buckley: "Generally people who carry knives are sent straight to prison, but I'm going to make an exception in your case.
"There has been a long wait in trying this case. In that time you have had another child and have been put to work with your stepfather.
"I am satisfied that in your case it is unjust [to give you a custodial sentence] so what I'm going to do his suspend your sentence."
Recorder Kelbrick also ordered Buckley to complete 100 hours of unpaid work.