bug-bash
[Top][All Lists]
Advanced

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

Re: Command substitution reduce spaces even in strings


From: Ken Irving
Subject: Re: Command substitution reduce spaces even in strings
Date: Tue, 8 Dec 2009 11:02:17 -0900
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Dec 08, 2009 at 02:01:23PM +0100, matez@fiz15.jupiter.vein.hu wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i686
> OS: linux-gnu
> Compiler: i686-pc-linux-gnu-gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
> -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  
> -DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
>  -DSTANDARD_UTILS_PATH='/bin:/usr/bin:/sbin:/usr/sbin' 
> -DSYS_BASHRC='/etc/bash/bashrc' -DSYS_BASH_LOGOUT='/etc/bash/bash_logout' 
> -DNON_INTERACTIVE_LOGIN_SHELLS -DSSH_SOURCE_BASHRC -O2 -march=athlon-mp -pipe
> uname output: Linux fiz15.jupiter.vein.hu 2.6.30-gentoo-r8 #1 SMP Thu Nov 12 
> 16:15:30 CET 2009 i686 AMD Athlon(tm) MP 2000+ AuthenticAMD GNU/Linux
> Machine Type: i686-pc-linux-gnu
> 
> Bash Version: 4.0
> Patch Level: 35
> Release Status: release
> 
> Description:
>       [Detailed description of the problem, suggestion, or complaint.]
> 
> The command substitution reduce spaces even in strings.
> This is not healthy on copying files of which names containing double or 
> more spaces generated by command substitution.
> Short example:
> 
> $ echo $(echo "'alfa  beta'")
> 'alfa beta'
> 
> Instead of 'alfa  beta' with double space.
> 
> Repeat-By:
>       [Describe the sequence of events that causes the problem
>       to occur.]
> 
> 
> $ echo $(echo "'alfa  beta'")
> 'alfa beta'
> 
> Instead of 'alfa  beta' with double space.

$ echo "$(echo "'alfa  beta'")"
'alfa  beta'

-- 
Ken Irving, ken.irving@alaska.edu




reply via email to

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