[lfs-support] Glibc chapter 6 stuck...

Bruce Dubbs bruce.dubbs at gmail.com
Mon Aug 13 21:35:05 PDT 2012


Michael Robinson wrote:
> On Mon, 2012-08-13 at 20:38 -0500, Bruce Dubbs wrote:
>> Michael Robinson wrote:
>>> root:/# DL=$(readelf -l /bin/sh | sed -n 's at .*interpret.*/tools\(.*\)]$@\1 at p')
>>> bash: command substitution: line 45: syntax error near unexpected token `)'
>>> bash: command substitution: line 45: `readelf -l /bin/sh | sed -n 's at .*interpret.*/tools\(.*\)]$@\1 at p')'
>>> root:/#
>>
>> Since it is evidently a script (line 45), I suspect a problem at a line
>> earlier in the script.
>>
>> When you think there is a error, cut and paste the code inside the $()
>> to check.  In this case:
>>
>> readelf -l /bin/sh | sed -n 's at .*interpret.*/tools\(.*\)]$@\1 at p'
>>
>>     -- Bruce
>>
> I got past the compile glibc step in chapter 6 and got the checks to
> print the correct results, but my temporary bash must still be broken.
>
> I substituted back ticks for $(...) as a workaround.
>
> I'm still curious what on my Fedora 17 host caused a problem when I
> compiled the temporary bash.

You didn't address the issue.  The problem is with your script.  The 
backticks just hid the problem.

You can check the construct with something like: echo $(ls)

   -- Bruce






More information about the lfs-support mailing list