On 09/02/2010 08:25 AM, Eric Blake wrote:
Next, your trace showed the cause of the first message:
+mktempd_:51> template_length_=+mktempd_:1> wc -c
+mktempd_:51> template_length_=' 16'
+mktempd_:52> nx_=+mktempd_:1> echo gt-init.sh.
+mktempd_:52> nx_=+mktempd_:1> wc -c
+mktempd_:52> nx_=' 12'
+mktempd_:53> nx_=+mktempd_:1> expr ' 16' - ' 12'
non-numeric argument
So wc is outputting space-padded results, and expr doesn't like the
leading spaces.
But the leading spaces wouldn't have been there in the first place, if
zsh had properly been in POSIX mode. (I'll never know why zsh thinks
that inhibiting field splitting by default makes sense for portability
matters.) With a proper shell, expr would never have seen leading
spaces in the first place to complain of a non-numeric argument.
--
Eric Blake ebl...@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org