In what direction did the digestive system evolve in herbivores and carnivores and in parasites.

Organisms of herbivores that feed on indigestible plant foods, which contain a lot of fiber (cellulose), have developed special methods of assimilation during evolution, since in the gastrointestinal tract of most herbivores the cellulase enzyme that breaks down cellulose to glucose is not formed. The most common way is to fill the intestines with symbiotic microorganisms that can ferment cellulose and turn it into glucose suitable for absorption. In this way, many mammals digest cellulose.
For example, in ruminants of the order Artiodactyl symbionts (bacteria and ciliates that break down cellulose) are located in the front of the digestive tract, mainly in the multi-chamber stomach, i.e. where digestion takes place, but in many animals (in equines from the order rabbits, termites, etc.) symbionts settle in the back of the intestinal tract – in the cecum and colon, that is, where there is absorption. Along with the symbiotic method of digesting plant foods, many species exhibit coprophagy, i.e., eating their feces, as a result of which the digested mass is secondarily exposed to microorganisms. Coprophagy, for example, is characteristic of gorillas, rabbits, and most rodents. It provides the reabsorption of nitrogen from the absorbed intestinal symbionts and vitamins produced by them.
Predators saliva does not contain enzymes, because predators do not chew food, but cut it with powerful jaws and swallow large portions. They need a big stomach. It is extensive, accounting for 60 -70% of the total digestive system. This explains that predators are capable of eating food up to once a week (since they manage to kill an animal quite rarely). The length of the small intestine in predators is much shorter (from 3 to 6 sizes of the body of a predator) than in herbivores (10-12 body sizes). The colon of the predators is short and smooth. In herbivores, it is long with an uneven surface.
In parasites, a simplification (or disappearance) of the digestive system occurs during evolution.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.