+0
The gravediggers took up their spades and flung heavy clods of clay in on the coffin. Mr Bloom turned away his face. And if he was alive all the time? Whew! By Jingo, that would be awful! No, no: he is dead, of course. Of course he is dead. Monday he died. They ought to have some law to pierce the heart and make sure or an electric clock or a telephone in the coffin and some kind of a canvas airhole. Flag of distress. Three days. Rather long to keep them in summer. Just as well to get shut of them as soon as you are sure there’s no.
(James Joyce, Ulysses)

What does the last sentence mean?
+1
Just as well to get shut of them as soon as you are sure there’s no. = It is better to get rid of them (corpses) as soon as you are sure there is no (life in them).

Joyce stops at 'no' to show that Bloom either stops thinking about the problem of smelly (or still-alive) bodies or is hesitant to pursue the thought.
+1
As a speaker of BrE, I'd use 'get shot of' - and only in informal contexts.