Your message dated Tue, 4 May 2010 16:04:11 +0000
with message-id 
<20100504160411.15935.qm...@92566cf1b099f0.315fe32.mid.smarden.org>
and subject line Re: Bug#573287: dash: read function does not work as specified 
in manpage towards backslashes
has caused the Debian Bug report #573287,
regarding dash: read function does not work as specified in manpage towards 
backslashes
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.)


-- 
573287: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=573287
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dash
Version: 0.5.5.1-3
Severity: important

the bellow examples explain it:

#bash:
$ read line && echo $line
\\ \\ \\ \\
\ \ \ \

$ read -r line && echo "$line"
\\ \\
\\ \\

#dash:
$ read line && echo "$line"                
\\ \\ \\ \\
\\

$ read -r line && echo "$line"
\\ \\
\ \



-- System Information:
Debian Release: squeeze/sid
  APT prefers testing-proposed-updates
  APT policy: (500, 'testing-proposed-updates'), (500, 'unstable'), (500, 
'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-2-amd64 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages dash depends on:
ii  debianutils                   3.2.2      Miscellaneous utilities specific t
ii  dpkg                          1.15.5.6   Debian package management system
ii  libc6                         2.10.2-6   Embedded GNU C Library: Shared lib

dash recommends no packages.

dash suggests no packages.

-- debconf information:
* dash/sh: true



--- End Message ---
--- Begin Message ---
On Wed, Mar 10, 2010 at 11:02:15AM +0000, Rui Damas wrote:
> the bellow examples explain it:
> 
> #bash:
> $ read line && echo $line
> \\ \\ \\ \\
> \ \ \ \
> 
> $ read -r line && echo "$line"
> \\ \\
> \\ \\
> 
> #dash:
> $ read line && echo "$line"                
> \\ \\ \\ \\
> \\
> 
> $ read -r line && echo "$line"
> \\ \\
> \ \

Hi Rui,

it's the 'echo "$line"' that recognizes the backslash, not 'read -r',
see

 http://www.opengroup.org/onlinepubs/009695399/utilities/echo.html

Please try

dash -c 'read -r line && printf "%s\n" "$line"' <<\EOT
\\ \\
EOT

Regards, Gerrit.


--- End Message ---

Reply via email to