On Tue, Oct 3, 2017 at 8:20 PM, VY <vyau5...@gmail.com> wrote: > Thanks again for all the replies. > > I have a further question on this. > > Is doing "mv *" considered "bad coding"? > > In general, no matter which language I do, I try to avoid any side-effect. > > It reduces readability in the code. Hard to debug when you have pages > after pages of code that consists > of a lot of "side effects". > I much prefer > > "mv a c" > "mv b c" > > if I want to move directory a and b into c. > > Am I old school or is this not applicable in shell scripting? > > If nothing else, it's impractical to say the least... how often do you have to move everything in a directory (except the final entry in the list) into one directory, which happens to be that final entry?
And even if that were somehow reliably the case, imagine yourself coming back to read your code after a year or two has passed. Will you understand what it's doing then? That should be your #1 concern. -wes _______________________________________________ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug