Hacker News new | past | comments | ask | show | jobs | submit login

Not sure how portable it is, but gnu ls has a flag to solve this problem trivially:

  --zero    end each output line with NUL, not newline



Not available in macOS `ls` unfortunately.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: