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



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to