Package: dash
Version: 0.5.3-8
Severity: normal
Tags: patch

Hi,

thanks for maintaining this package.

When I try to split fields by tabs, dash doesn't honour multiple tabs
between fields as whitespace (at least that's how I interpret [1],
please correct me if I'm wrong).

I've attached a little patch, which fixes the problem for me.

I've also attached a little test script.

Thanks in advance,
    Stefan.

[1]: 
http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html#tag_02_06_05

-- System Information:
Debian Release: lenny/sid
  APT prefers gutsy-updates
  APT policy: (500, 'gutsy-updates'), (500, 'gutsy-security'), (500, 'gutsy')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.22-6-generic
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages dash depends on:
ii  debianutils                2.21          Miscellaneous utilities specific t
ii  libc6                      2.5-10ubuntu1 GNU C Library: Shared libraries

dash recommends no packages.

-- debconf information excluded

Attachment: ifstest.sh
Description: application/shellscript

diff -Nur dash-0.5.3.orig/src/miscbltin.c dash-0.5.3/src/miscbltin.c
--- dash-0.5.3.orig/src/miscbltin.c     2005-11-26 04:17:55.000000000 +0100
+++ dash-0.5.3/src/miscbltin.c  2007-06-16 16:13:35.000000000 +0200
@@ -122,7 +122,7 @@
                }
                if (c == '\n')
                        break;
-               if (startword && *ifs == ' ' && strchr(ifs, c)) {
+               if (startword && strchr(ifs, c) && ((c==' ') || (c =='\t'))) {
                        continue;
                }
                startword = 0;

Reply via email to