sed crashes on long lines, use awk instead