That process is called Swedging!
Most likely these were hydraulically pressed on a machine to square that up from the round cable shape to this sqaure shape!
Throttle cable places that repop Camaro stuff can do this for you! And...This ain't cheap! Sorry!