They both have the sense of singling out a discordant element. The "however" meaning attaches to a word that can be translated as "but" in most languages, but the "only" meaning is specifically Germanic and is a relict of Saxon in the English language. Phrases like, " I have but one life to give for my country" are deliberately archaic in English.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.