Live by the sword is one of the most designing and vague terms I have ever heard. Some people interpret as "Live violently, expect to die violently". It was stated that way intentionally. It is vague but appearing to be to short and to the point. Why? Because lazy, weak minded people are only worth short simplistic statements that they can cling onto and call wisdom. But the sword is just a metaphor "live by the sword and die by the sword" Has a much deeper meaning.
The sword is not a weapon or a sword. The sword is the representation of your standards in life. This changes the meaning to "live by your standards and you will surely die by them". Some standards are greed, pride, dishonor, honor, respect and disrespect, honesty and lie. Countless more examples but the "word" is your weapon in dealing with life. Love itself is a weapon, so "live by love and you will surely die loved"
I love the teachings of the Bible because of that example among many others. In that phrase you are given many options ranging from using words without thinking about them or not caring about the real meanings of them to reading and trying to learn from them and see inside your heart what they are really trying to imply.
Yes, the Bible was written for idiots, selfish, lazy and those with real interest alike. Those phrases often mean much more than the simple remarks put down in books that anyone can read.
Closing note: We all live and die by the sword, Our lives and convictions are the sword but no matter because we each carry our own sword and with that we decide our own fate.