This term for "marked" came from the old cattle rustling days - but well before the American West. Back in the 15th century, English farmers notched distinctive marks into the ears of their livestock to prevent them from being stolen.
This practice among animal breeders became so common that "earmark" was soon generalized to mean any identifying mark or purpose. For example, a certain amount of money may be earmarked or set aside to buy instruments for a school music program.
Earmark, meaning ID, may apply to people as well. Suspicious behavior may be the earmark of a thief; a particular piece of legislation may have all the earmarks of a boondoggle.
Are a hedgehog and a goat related? They may be, at least in a capricious way! The Italian word capriccio originally meant a shiver of fear. The thinking was that if a person was startled enough, his hair would stand on end and look like a the spines of a hedgehog. (The word came from capo - head - and riccio - hedgehog or frizzled.)
But at some point, etymologists claim, the sudden shiver became a sudden whim, and it all happened because capriccio also looked like the word for "goat," capra. Italian speakers coined the new word caprice from capriccio after watching goats in action, possibly when they were acting startled and impulsive. A goat's friskiness or sudden change from frolicking to butting heads gives us the word "caper" (a playful jump or prank) as well as the word "caprice" - the sudden or erratic change of mind. The root word, capriccio, still exists, going from shiver to sound. It remains to this day a lively, whimsical style of music. Why not?
SOURCES: 'Brewer's Dictionary of Phrase and Fable,' by Ivor Evans; 'The Encyclopedia of Word and Phrase Origins,' by Robert Hendrickson; 'Loose Cannons and Red Herrings,' by Robert Claiborne; 'Why You Say It', by Webb Garrison; The Oxford English Dictionary; 'Etymological Dictionary of the English Language,' by Walter W. Skeat; 'Morris Dictionary of Word and Phrase Origins,' by W. and M. Morris; 'The Barnhart Dictionary of Etymolgy,' by Robert Barnhart; 'The Second Browser's Dictionary,' by John Ciardi.