Because they do not have separate openings for reproduction and excretion, the posterior gut opening in the excretory systems of sharks is called a cloaca rather than an anus. In the digestive systems of sharks, food passes through a single short intestine and is afterwards expelled through the cloaca.
In sharks, food first passes through the esophagus, where finger-like extensions prevent the food from escaping. The stomachs of sharks are J-shaped and are about 20 percent of their length. The muscular stomach walls have cells that produce hydrochloric acid that softens and dissolves bone, and mucus to protect the stomach lining. Rings of muscle on the stomach walls perform peristalsis to mix and break down the food. The intestine is the site of nutrient absorption. In humans, the combined short and long intestines measure about 28 feet long, whereas the intestine of a shark is only a foot long, but much wider. The intestine of a shark works very slowly to digest food. Humans might void food only 4 hours after eating, but in sharks, the process might take 16 to 17 hours.
Another method a shark uses to void waste is by turning its stomach inside out. When it has indigestible matter in its stomach, it expels its stomach inside out through its mouth, rinses the stomach with sea water and retracts it to its normal position.