On Thu, Dec 09, 2004 at 05:21:32PM -0800, Bob Miller wrote:
> Jacob Meuser wrote:
> 
> > ah, nice.  I was worried about the leading spaces as well, but printf
> > seems to take care of that:
> > 
> > $ tb=0; for i in *; do b=`wc -c < $i`; b=`printf "%d" $b`; \
> > tb=`expr $tb + $b`; done; echo $tb
> 
> You didn't quote $b before passing it to expr, so the shell will strip
> off spaces there.
> 
> $ tb=0; for i in *; do b=`wc -c < $i`; \
>   tb=`expr $tb + $b`; done; echo $tb

didn't work for me.  shell is zsh 4.2.0 (i386-unknown-openbsd3.6).

expr: non-numeric argument
expr: syntax error
expr: syntax error
expr: syntax error
...

-- 
<[EMAIL PROTECTED]>

_______________________________________________
EUGLUG mailing list
[EMAIL PROTECTED]
http://www.euglug.org/mailman/listinfo/euglug

Reply via email to