Also, did the solders ever dig trenches so that they could have something to hide behind?
You might be interested in some of my previous answers. To put it briefly, no, it was not a death sentence; most soldiers survived battle without a scratch.
https://www.reddit.com/r/AskHistorians/comments/c473hy/why_would_anyone_stand_in_the_front_row_of_a/
https://www.reddit.com/r/AskHistorians/comments/9xgmlt/firing_lines/