I hang them up by one end and make a small paper funnel at the top of the sheath. Hold the funnel in place with tape or whatever..
Then put some light oil like 3-in-One or WD40 and wait till it works it's way down and drips out the bottom of the sheath. Sometimes on an old dirty rusted cable this takes a day or more.
If there's rust and things are really tight, once it is able to move slightly the cable can be worked in and out ... pull it from one end and then pull it from the other. Hang it up again and more oil..
If a cable's design allows it to be removed from the sheath it should be greased with all-purpose grease. Grease is just very thick oil and it stays where you put it for a longer period of time.