Not exactly military, but worth a chuckle or two: Back in 6th, 7th, and 8th grade we changed classes as a class. All 6th graders would change from one class to the next, etc. This was mainly just before recesses - we'd come into the "new" class and drop off our crap, then go to recess. One day we blew into Mrs. Boling's Art/Music class - I guess we were rowdy as she was NOT impressed by our decorum and told us that we'd be writing essays that day on how to behave. After recess, Mrs. Boling was always the very last teacher to come out of the office and let us into the classroom. She was particularly late that day.
When she finally did come out, we were all lined up in order of height, boys in their line, girls in theirs. You wouldn't have seen lines that straight at West Point. Utter silence, and as "at attention" as Jr. high kids could get. She opened the door, girls filed in, followed by the boys. We sat at our desks, hands folded and you could have heard an ant fart at 100 yards. She pottered about at her desk for a few minutes, and finally says "Ok, I'm going to let you get away with it this time - but don't let it happen again!" Muted cheers ensued.