Your message dated Thu, 3 Mar 2011 21:55:16 -0700 with message-id <[email protected]> and subject line Re: Bug#616398: Solved has caused the Debian Bug report #616398, regarding coreutils: wc -c and wc -m not working properly to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 616398: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=616398 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: coreutils Version: 8.5-1 Severity: normal As far as I can tell wc is not working properly with the arguments -c or -m. I am learning to write shell programs and wc -c and wc -m are always 1 chracter off. Here is an example: steven@debtop:~/Documents/nixbooks/shell-practice$ echo 1 | wc -m 2 steven@debtop:~/Documents/nixbooks/shell-practice$ echo 1 | wc -c 2 steven@debtop:~/Documents/nixbooks/shell-practice$ echo 1 | wc 1 1 2 steven@debtop:~/Documents/nixbooks/shell-practice$ echo hello | wc 1 1 6 steven@debtop:~/Documents/nixbooks/shell-practice$ steven@debtop:~/Documents/nixbooks/shell-practice$ echo "hello" | wc -c 6 steven@debtop:~/Documents/nixbooks/shell-practice$ echo hello | wc -c 6 I hope that I have this right. I am new and don't want to waste anyone's time, but this doesn't appear to be working the way my text book and the man page describes. Any help would be much appreciated. -- System Information: Debian Release: 6.0 APT prefers stable APT policy: (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages coreutils depends on: ii libacl1 2.2.49-4 Access control list shared library ii libattr1 1:2.4.44-2 Extended attribute shared library ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib ii libselinux1 2.0.96-1 SELinux runtime shared libraries coreutils recommends no packages. coreutils suggests no packages. -- no debconf information
--- End Message ---
--- Begin Message ---Steven Sciame wrote: > I sincerely, apologize for the error in the bug report. > This is solved. You are not the first person and you won't be the last. :-) For the archive in case someone else reads it looking for the same issue the reason this is not a bug is that 'echo' terminates the string with a newline and that newline adds one more to the character count. This is most easily seen using od to dump the values for inspection. $ echo hello | wc -c 6 $ echo hello | od -c -tx1 0000000 h e l l o \n 68 65 6c 6c 6f 0a Marking this bug as closed. Bob
--- End Message ---

