Aaron Bohane, with an address at St Vincent's Hostel in Cork, was arrested at 9.40am yesterday.
This morning, at the special sitting of Cork District Court, Garda Joe Crowley told Judge Philip O'Leary that Mr Bohane made no reply when he was charged with two offences.
The accused was charged with assault causing harm, contrary to Section 3 of the Non Fatal Offences Against the Person Act, 1997 and also with producing a bladed object, contrary to Section 13 of the Firearms and Offences Act 1990.
Defence barrister Elaine Audley said that while there was no application for bail at this time, Mr Bohane is reserving his position in relation to his bail application.
Free legal aid was granted and Mr Bohane was remanded in custody.
He is due to appear before Cork District Court on Wednesday via video link.
The assault victim, Mr Gavin Sheehan, was treated at Cork University Hospital and has since been discharged.