sort based on the beginning of the line, but print the whole line