5.8. Does sed issue an exit code?
Most versions of sed do not, but check the documentation that came
with whichever version you are using. GNU sed issues an exit code
of 0 if the program terminated normally, 1 if there were errors in
the script, and 2 if there were errors during script execution.