"Corporal Si Klegg and his 'Pard'" is a novelised account of the average Civil War soldier. It was written by 65th Ohio Infantry Lt. Col. Wilbur F. Hinman in 1887 and from what I know of the Civil War soldier, is pretty accurate. On page 254 is a note by the author in which he describes a future president of the United States of America.
During a long midsummer march, the writer saw a robust brigadier-general, who was afterward President of the United States, engaged in hunting the pediculus, with his nether garment spread out upon his knees in the popular style. It was just after the army had bivouacked for the night at the end of a hard day's march. The soldiers had no tents, nor anything else to speak of - except graybacks. These were exceedingly numerous and active. The general had wandered out back of his headquarters, and, squatting behind a large tree, applied his energies to the work of "skirmishing," while the setting sun cast a mellow glow over the touching scene. Not far way, behind the other big trees, were two of his staff officers similarly engaged - cracking jokes and graybacks.
"Skirmishing" was a soldier's term not only for fighting in open order but also for pest control. Grayback or pediculus is body lice. The general mentioned is likely Grant.