Man of the West

Link Jones (Gary Cooper) rides into Crosscut, Texas to have a bite to eat, then catch a train to Fort Worth, where he intends to use the savings of his community of Good Hope to hire a schoolteacher.
On the train platform, Sam Beasley (Arthur O'Connell) speaks with Link briefly, rousing the suspicions of the town marshal, Sam being a known con man. When the marshal comments that Link looks familiar, Link gives him a false name.
Aboard the train, Sam impulsively joins Link, learns of his mission in Fort Worth and claims he can be of help. Sam introduces him to the Crosscut saloon singer, Billie Ellis (Julie London), insisting she could make an ideal teacher.
Their conversation is overheard by Alcutt, a shady-looking passenger. When the train stops to pick up wood for additional fuel, male passengers help load the train but Alcutt remains on board, feigning sleep. He signals three other men, Coaley Tobin (Jack Lord), Trout (Royal Dano) and Ponch (Robert J. Wilke), who rob the train.
Link tries to intervene and is knocked unconscious. The train pulls away, with Alcutt riding off with Link's bag containing Good Hope's money. Alcott is wounded as he and the robbers flee.
Link revives to discover that he, Sam and Billie have been left behind, many miles from the nearest town. Link leads them on foot to a ramshackle farm, admitting that he lived there years earlier. While the others wait in the barn, Link enters the run-down house and finds the train robbers hiding inside.
Coaley is suspicious of Link's claim that he simply wants to rest for the night. They are interrupted by aging outlaw Dock Tobin (Lee J. Cobb), who is startled to see Link, his nephew, whom he raised as a killer and thief. Link abandoned him more than a dozen years earlier to go straight. Tobin laments that nothing has been the same since Link's departure and introduces him to the roughnecks he now commands, including Link's own cousin, Coaley.
Disturbed by the revelation of Link's true identity, Coaley demonstrates his toughness by killing Alcutt, who is near death from his wound. Realizing the danger of his situation, Link brings in Sam and Billie from the barn and lies to Tobin, telling him that he intentionally sought out his uncle after being left by the train.
Tobin reveals his long-held ambition to rob the bank in the town of Lassoo and asserts that Link's return to the gang makes that possible. Link agrees to participate in the holdup to protect Billie, after a knife held to his throat while Coaley drunkenly insists that she strip. Tobin waits until she is nearly undressed before he laughingly sends Link and Billie to sleep in the barn, Link lying that she is his woman.
Claude Tobin (John Dehner), another cousin, arrives and is displeased at finding Link there. Tobin rejects the suggestion of Claude and Coaley to kill Link and the others. They depart on the four-day ride to Lassoo.
As revenge for the brutal treatment of Billie at the ranch, Link goads the brutal Coaley into a fistfight and beats him severely, then forcibly strips him of his clothes. Deeply humiliated, Coaley attempts to shoot the unarmed Link, but Sam intercedes and is killed instead. Tobin then shoots Coaley for disobeying him.
Billie laments that she has finally found a man worth loving, but can never have him. Link has a wife and children in Good Hope.
With the town Lassoo in sight, Link volunteers for the holdup job, secretly hoping that in town he can seek help. Tobin insists that he be accompanied by the mute Trout. It turns out that Lassoo is a ghost town, its bank deserted except for a frightened old Mexican woman, whom Trout shoots in a panic. Link proceeds to kill Trout. He then awaits the arrival of Claude and Ponch. In a drawn-out gun battle, Link kills Ponch first, then eventually and with some regret, Claude.
Returning to camp, Link discovers to his horror that Billie has been raped and beaten. He goes in search of Tobin, who is on a cliff nearby. Link calls out to Tobin that he, like Lassoo, is a ghost and finished. He shoots Tobin and reclaims the bag of Good Hope's money.
Riding back to civilization, Billie tells Link she loves him, but is resigned to the fact that she must resume her singing career and proceed alone, knowing that Link intends to return to his home and family.

Question: Who Shoots Coaley?
Answer: Tobin