Replacing some sed lines by awk (legibility and performance)