Y
Hacker News
new
|
ask
|
show
|
jobs
by
Anthony-G
3190 days ago
Parsing `ls` is never a good idea[1]. A more robust way to use globbing in a POSIX shell would be something like this:
printf "%s\0" files* | xargs -0 -n 1 -P 8 long_process
1.
http://mywiki.wooledge.org/ParsingLs
1 comments
enriquto
3190 days ago
I disagree with the article that you linked. Filenames are variable names that you get to choose. Half of the game is won by chosing them wisely, so that they are convenient to use.
link