On Saturday 22 September 2001 06:15, Frank Barknecht wrote:
> Steve Litt hat gesagt: // Steve Litt wrote:
> > The wc command counts spaces, so if you simply remove the -c from the wc
> > command at the bottom of this thread, you'll see three numbers output on
> > one line. The first number is the number of lines, and is probably
> > totally meaningless. The second number is the number of words. The third
> > number is the number of characters, including spaces.
>
> Yup, that's right. The small script in my previous mail counts
> characters, lines and words and it puts a little headline above
> the outcome, because I alwas forget, which count is which ;)

Yes, but on further thought I think you might need to subtract the number of 
lines from the number of characters, because presumably the character count 
shouldn't include newlines. So in Unix/Linux/BSD subtract the number of 
lines, and in DOS/Windows subtract double the number of lines (crlf).

Steve

-- 
Steve Litt
Webmaster, Troubleshooters.Com
http://www.troubleshooters.com
[EMAIL PROTECTED]
(Legal Disclaimer) Follow these suggestions at your own risk.




Reply via email to