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.
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.