Quote:
Regarding zsh, I avoid it because it handles quoted arguments differently to every other Bourne-based shell
|
Differently? No, I think you mean _properly_.
Zsh does not automatically perform word splitting on quoted arguments (which, by definition, are intended to be a single argument). This behaviour of bash et al is DEFECTIVE. What other language mangles parameters like this? This is the reason I switched to zsh over 4 years ago, and I haven't looked back.
By the way, you can make zsh do automatic word splitting by setting the sh_word_split option (see also the 'emulate' builtin). You can do work splitting on a single parameter with ${=param} ...
Quote:
And regarding using stat instead of ls, be aware that stat is Linux only,
|
Bugger, I wasn't aware of that, thanks for pointing that out.
However, I see your point and I raise you the fact that zsh has it's own builtin version of stat! Who's portable now?
OK, joking aside, I agree, zsh isn't fully bourne compatible (see the wildly different read builtin for example), so bash is better if you do want/need to write a reasonably portable script. But, of course, the shell you use for (portable) scripts and the shell you use interactively don't have to be the same...