|
|
|
|
|
by intrepidhero
1220 days ago
|
|
The number one use case of `for` in shell scripting is over the output of `$(ls .)` And I immediately run into a problem with filenames that have spaces and then I discover that a stringly typed language has lots of sharp edges. I fall back on `for filename in os.listdir():` |
|
https://www.shellcheck.net/wiki/SC2012
"ls is only intended for human consumption: it has a loose, non-standard format and may "clean up" filenames to make output easier to read."