ma...@fiz15.jupiter.vein.hu a écrit :
> Short example:
> $ echo $(echo "'alfa beta'")
> 'alfa beta'
>
> Instead of 'alfa beta' with double space.
Always try tracing to understand what is going on:
echo $(set -x ;echo "'alfa beta'")
++ echo ''\''alfa beta'\'''
http://www.mpi-inf.mpg.de/~u
-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: releas
ch=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
>
>
On Tue, Dec 08, 2009 at 02:01:23PM +0100, ma...@fiz15.jupiter.vein.hu wrote:
> $ echo $(echo "'alfa beta'")
> 'alfa beta'
>
> Instead of 'alfa beta' with double space.
echo "$(echo "'alfa beta'")"
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 fi