bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possible bash bug when dealing with CR/LF in variable expansion


From: Johannes Thoma
Subject: Possible bash bug when dealing with CR/LF in variable expansion
Date: Tue, 17 Jan 2006 20:11:31 +0100 (MET)

From: johannes
To: bug-bash@gnu.org,bash@packages.debian.org
Subject: [50 character or so descriptive subject here (for reference)]

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='lin
uname output: Linux entwicklung08 2.6.10-5-386 #1 Mon Oct 10 11:15:41 UTC
2005
Machine Type: i386-pc-linux-gnu

Bash Version: 3.0;3.1
Patch Level: 16
Release Status: release

Description:
  When a variable contains a CR/LF sequence and the variable is appended
a value then the LF appears at the end of the result (instead of after
the CR). This happens with bash 3.0 and 3.1.

Repeat-By:
  The bug can be repeated easily like printed below:

johannes@entwicklung08:~/bash/bash-3.1$ zak=`printf '\x0d\x0a'`
johannes@entwicklung08:~/bash/bash-3.1$ echo $zak | od -t x1
0000000 0d 0a
0000002
johannes@entwicklung08:~/bash/bash-3.1$ zak="${zak}karin"
johannes@entwicklung08:~/bash/bash-3.1$ echo $zak | od -t x1
0000000 0d 6b 61 72 69 6e 0a
0000007

Fix: 

Please tell me if this is really a bug. If it is I can send a patch.

- Johannes

-- 
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner




reply via email to

[Prev in Thread] Current Thread [Next in Thread]