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@.*interpret.*/tools\(.*\)]$@\1@p')
>>> bash: command substitution: line 45: syntax error near unexpected token `)'
>>> bash: command substitution: line 45: `readelf -l /bin/sh | sed -n 
>>> 's@.*interpret.*/tools\(.*\)]$@\1@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@.*interpret.*/tools\(.*\)]$@\1@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



-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to