New awk reformatting function