3 ms·
$ for file in $(ls); do echo $file; done Please don't do this. I understand why it was put there, but don't. There are other examples of this construct, and mo
by dozzie 10y ago
$ for file in $(ls); do echo $file; done
Please don't do this. I understand why it was put there, but don't. There are
other examples of this construct, and most of them actually make sense.
People reading the article are not shell experts and don't know that in
this particular case it's extremely bad idea to use `ls` (shell wildcard is
the proper way here), so don't give them such example. This statement should
be burned with fire.