[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wc -m reports one too many?
From: |
Bob Proulx |
Subject: |
Re: wc -m reports one too many? |
Date: |
Sat, 8 May 2004 11:38:01 -0600 |
User-agent: |
Mutt/1.3.28i |
Andreas Schwab wrote:
> Tobias Reif <address@hidden> writes:
>
> > echo f | wc -m
> >
> > should yield 1.
>
> No, you forgot to count the newline.
>
> $ printf f | wc -m
> 1
For more information use 'od' to dump each character for your
inspection.
echo f | od -c
0000000 f \n
0000002
printf f | od -c
0000000 f
0000001
Bob