He was born Samuel David Shamforoff on Aug. 27, 1916, in Brooklyn, NY, to Russian-Jewish immigrants. His father, William, was a milliner and his mother, Rose, was a homemaker. The family name was changed to Shaw when Sam was a teenager. His older brother was Irwin Shaw, who grew up to become a noted novelist.
Mr. Shaw graduated from the Pratt Institute in Brooklyn, and, after serving during World War II, became a writer for episodic radio in New York. He then moved to Los Angeles to be a comedy writer.
His first film credit was for the story for A Foreign Affair, the 1948, Berlin-set Billy Wilder political comedy starring Jean Arthur. But thereafter, he wrote mainly for the nascent medium of television. He wrote scripts for "Playhouse 90," "Philco TV Playhouse," "The Defenders," and "Studio One." He was nominated for a Golden Globe Award for his screeplay for the 1970 comedy "If It's Tuesday, This Must be Belgium."
He remained friends with Tarloff throughout his life. For many years, the two joined several other Hollywood writers and producers, including Fred Freiberger, Bernie Kahn and Michael Morris, every Tuesday at the Mulholland Tennis Club. In 1998, filmmaker David Zeiger made a documentary about the group of friends called "Funny Old Guys."
Mr. Shaw is survived by his wife, Maxine Stuart, an actress whom he married in 1973; two daughters, Liz Baron of Dallas, and Ellen Agress of New York City; a stepdaughter, Chris Ann Maxwell; and four grandchildren.