bug-bash
[Top][All Lists]
Advanced

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

[Fwd: Re: PROBLEM: bash builtin read discards leading&trailing spaces]


From: gregory mott
Subject: [Fwd: Re: PROBLEM: bash builtin read discards leading&trailing spaces]
Date: 05 May 2003 21:19:52 +0100

okic, unset IFS is not the same as IFS= <null>
never mind, sorry to bother

On Sat, 2003-05-03 at 20:02, gmott@together.net wrote:
> 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   .>





reply via email to

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