A Bayonet was a bladed mêlée weapon similar to a knife or dagger, that is usually fixed to the end of a rifle. This turns the rifle into a non-throwing spear.
In 2367 on Torgu-Va the Human warriors had attached bayonets to their M1 Garand rifles. The Tarn forces on the planet had also used bayonets. (TNG novel: The Forgotten War)
A series of toy soldiers armed with riffles and bayonets were created to prevent Captain James T. Kirk's landing party from leaving the nursery planet. (TOS comic: "Mudd's Magic!")
Broca was executed by the Jem'Hadar using bayonets they attached to their weapons. (DS9 episode: "What You Leave Behind")