On Thu, Dec 09, 2004 at 09:29:23AM -0800, Bob Miller wrote:
> Jacob Meuser wrote:
> 
> > well, I didn't know about wc -c, thanks.  however, the output,
> > at least on my system, is not easily parsable, as it is oddly
> > aligned, with varying amounts of space.
> 
> If you use "wc -c < file" instead of "wc -c file" then wc
> doesn't print the file name.

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

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

Reply via email to