Green’s Dictionary of Slang

what the shit! excl.

[shit, the phr.]

an excl. of annoyance, surprise or resignation; var. on what the hell! excl.

J. Bouton I’m Glad You Didn’t Take it Personally 137: ‘What the shit. The more I think about it, it’s not so bad’.
[US]C. Loken Come Monday Morning 52: But, what the shit, I decided to hang ’em up.
[US]L. Kramer Faggots 282: What the living, fucking, shit have I done?
[UK]D. Gram Foxes (1980) 12: I mean, what the shit.