if you are in a trench, you are safe from everything but artillery, and, even that would need a pretty direct hit. But, as soon as you come up out of your trench, you are an easy target for rifle fire, and even easier for machine guns. In the time it took to advance those few hundred metres, through razor wire, between yours, and the enemy trench, you probably died. Attacking in trench warfare was difficult, and deadly. It wasn't until the invention of the tank that things began to really change