[lfs-support] chapter06 glibc

DJ Lucas dj at linuxfromscratch.org
Wed Jan 30 21:36:18 PST 2013

On 01/30/2013 06:50 PM, Bruce Dubbs wrote:
> Yusuf Yılmaz wrote:
>> gawk already installed. i think the problem on chroot system. cause on the
>> host system:
>> export test=asd
>> echo $(test)
>> runs success but on chroot lfs system
>> it gives this error:
>> root:/# export test=asd
>> root:/# echo $(test)
>> bash: command substitution: line 3: syntax error near unexpected token `)'
>> bash: command substitution: line 3: `test)'
> Your syntax is wrong.  You want:
> echo ${test}
> Variable substitution is done with braces, {}, not parentheses ().
>     -- Bruce

Actually, that should still work in bash...just not on the variable 
named test, but on the test executable (actually the built-in IIRC). The 
output should be a single blank line. I vaguely remember seeing this 
behavior myself a long time ago, but don't recall the cause. Best guess 
is Armin's suggestion, followed by patches not applied correctly, but 
I'm not certain. Either way, the interpreter being used now is broken. 
Backtick (`) syntax will probably still work for the test case, but that 
doesn't really do anything for the OP. The chapter 5 bash is broken and 
must be rebuilt.

-- DJ

More information about the lfs-support mailing list