4 ms·
What is wrong with piping `ls`?
What is wrong with piping `ls`?
It's usually redundant.
for i in * <--> for i in `ls`
http://mywiki.wooledge.org/ParsingLs http://mywiki.wooledge.org/ParsingLs
Usually it is more pristine (from a theoretical standpoint) to use filename generation, aka globbing. You don't need a subprocess.