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

Ironically, if the given example was written in pure bash, it would be violating best practices. You don't parse ls line-by-line because you can't make the assumption that filenames will map to lines.

Taking this contrived example at face value, imho, I'd instead place the "best of bash" for the particular task with file globbing.




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

Search: