Could other soldiers kill one another without reprucssions as seen in movies?

by TheEureka16

In many different movies you see the commanding officer shoot and kill some one who is disobedient or who does a poor job? Would this ever have been allowed or just Hollywood history?

cynest

Any particular time period or war?