Sort by line, word and characters