patrick sarsfield gilmore (december 25, 1829 – september 24, 1892) was an irish-born american composer and bandmaster who lived and worked in the united states after 1848. while serving in the union army during the u.s. civil war, gilmore wrote the lyrics to the song "when johnny comes marching home". this was published under the pseudonym louis lambert in september 1863.