[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PROBLEM: bash builtin read discards leading&trailing spaces
From: |
gmott |
Subject: |
PROBLEM: bash builtin read discards leading&trailing spaces |
Date: |
Sat, 3 May 2003 20:02:00 +0100 |
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H -D_GNU_SOURCE -I. -I. -I./include
-I./lib -O2 -march=i386 -mcpu=i686
uname output: Linux ruby 2.4.18-27.7.x #1 Wed Mar 26 10:50:35 EST 2003 i686
unknown
Machine Type: i686-pc-linux-gnu
Bash Version: 2.05a
Patch Level: 0
Release Status: release
Description:
bash builtin read command discards leading&trailing spaces
even when IFS is unset
this means a workaround hack is required to handle pathnames which happen
to have leading or trailing spaces
Repeat-By:
[Describe the sequence of events that causes the problem
to occur.]
bash-2.05a$ unset IFS
*bash-2.05a$ echo -en " boo hoo \0"|{ read -rd $'\0' a;echo "<$a>";}
<boo hoo>
*bash-2.05a$ echo -en ". boo hoo .\0"|{ read -rd $'\0' a;echo "<$a>";}
<. boo hoo .>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- PROBLEM: bash builtin read discards leading&trailing spaces,
gmott <=