Complex sentence: It was in German service for the duration of the war and by the end of the war it was in a totally gutted state and eventually sold.
Split into simpler sentences: It was in German service for the duration of the war. By the end of the war it was in a totally gutted state and eventually sold.