This is one of those classic Unix “looks simple until you actually try to do it correctly” problems.
The fact that filenames can contain almost anything (including newlines or starting with `-`) makes even basic stuff like looping or piping surprisingly fragile
I’ve personally started defaulting to things like `./*` and being extra careful with scripts after getting burned once.
Kinda feels like too much flexibility here actually makes systems harder to work with.
Popular in:
2019 (94 points, 96 comments) https://news.ycombinator.com/item?id=19414278
2013 (107 points, 76 comments) https://news.ycombinator.com/item?id=6644955
2012 (52 points, 43 comments) https://news.ycombinator.com/item?id=4483730
This is one of those classic Unix “looks simple until you actually try to do it correctly” problems.
The fact that filenames can contain almost anything (including newlines or starting with `-`) makes even basic stuff like looping or piping surprisingly fragile
I’ve personally started defaulting to things like `./*` and being extra careful with scripts after getting burned once.
Kinda feels like too much flexibility here actually makes systems harder to work with.