[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-textutils] bug in wc?
From: |
Bob Proulx |
Subject: |
Re: [Bug-textutils] bug in wc? |
Date: |
Sun, 17 Sep 2000 23:51:13 -0600 (MDT) |
> I just noticed that if the last line in a file doesn't have a \n
> character at the end, wc doesn't count that line. Is this the intended
> behavior or a bug?
Yes that is the intended behavior. The wc program counts the number
of newlines in a file. If a file does not end in a newline then it
won't get added to the count of newline characters. Check out the man
page for wc, the info page for wc or the online standards pages.
http://www.UNIX-systems.org/single_UNIX_specification_v2/xcu/wc.html
Bob