News for hackers. Stuff that matters.
Re:Show HN: Command Line Challenge by zokier on Thursday January 26, 2017 @02:05PM (#13494243)
The mostly correct answer is `ls -1`. Just mostly, because it falls to the classic unix trap (filenames can contain almost anything) which also shows that the challenge is ill defined. What is the expected result if the filename contains newlines?

And this is not just some hypothetical scenario, just today at work I encountered a file with cursor movement terminal escape sequences in the filename.

Re:Show HN: Command Line Challenge by lisivka on Thursday January 26, 2017 @08:15PM (#13496937)
`ls -1b` should work correctly in your case. Option -b (or --escape) enables C-style escapes. IMHO, it should be on by default.