On Tue, Jan 31, 2012 at 6:52 AM, Firerat <[email protected]> wrote: > On 31 January 2012 10:38, Dave H <[email protected]> wrote: >> On Tue, Jan 31, 2012 at 5:29 AM, Dave H <[email protected]> wrote: >> As for the following line, >> bash: command substitution: line 47: >> >> This is what i receive when i attempt to set DL. I'm not trying to >> automate, just copying and pasting from the section 6.9 Glibc section. >> Here is exactly what is entered: >> ========================================================================== >> root:/sources/glibc-2.14.1# DL=$(readelf -l /bin/sh | sed -n >> 's@.*interpret.*/tools\(.*\)]$@\1@p') >> bash: command substitution: line 53: syntax error near unexpected token `)' >> bash: command substitution: line 53: `readelf -l /bin/sh | sed -n >> 's@.*interpret.*/tools\(.*\)]$@\1@p')' >> ========================================================================== >> >> Also to note: the number increments by 1 every time the command is >> issued, which is why it is 53 now in the example above. (??) >> >> However, if I take DL=$ out of the picture, i get >> ========================================================================== >> root:/sources/glibc-2.14.1# readelf -l /bin/sh | sed -n >> 's@.*interpret.*/tools\(.*\)]$@\1@p' >> /lib64/ld-linux-x86-64.so.2 >> ========================================================================== >> >> So It seems I just cant set the variable DL >> >> Sorry and to clarify, the following lines on the page require that >> DL=/lib64/ld-linux-x86-64.so.2 . If it isn't, Ii get errors further >> on the page. >> >> I'm concerned if I dont get this step right, Ill have much more >> problems later on. >> > You have me stumped, > The error does look like bash is trying to 'run' multiple lines ( at least 47 > ) > > what happens if you leave off the DL= > i.e. ( one line ) > > $(readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p')
with this i get: =========================================================================== $(readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p') bash: command substitution: line 54: syntax error near unexpected token `)' bash: command substitution: line 54: `readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p')' =========================================================================== > same kind of error? > how about > > (two lines) > > set -vx > > $(readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p') with this i get: =========================================================================== root:/sources/glibc-2.14.1# $(readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p') $(readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p') readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p') bash: command substitution: line 55: syntax error near unexpected token `)' bash: command substitution: line 55: `readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p')' =========================================================================== > # use set +vx to undo those noisy flags > > You could also try using ` <commands> ` instead of $( <commands> ) > ( not a single quote ' but the `, might be to the left of 1 ) > > i.e. > ` readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p' ` this looks like i get something different (this is still with set -vx) =========================================================================== root:/sources/glibc-2.14.1# ` readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p' ` ` readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p' ` readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p' ++ readelf -l /bin/sh ++ sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p' + /lib64/ld-linux-x86-64.so.2 bash: /lib64/ld-linux-x86-64.so.2: No such file or directory ============================================================================ now the same string entered above after set +vx ============================================================================ root:/sources/glibc-2.14.1# ` readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p' ` bash: /lib64/ld-linux-x86-64.so.2: No such file or directory ============================================================================ it almost looks like it's trying to run something on the result or whatever? > hopefully the set -vx will shed some light on it > -- > Firerat > Talented, Witty And Thoughtful .. is how most describe me. > -- > http://linuxfromscratch.org/mailman/listinfo/lfs-support > FAQ: http://www.linuxfromscratch.org/lfs/faq.html > Unsubscribe: See the above information page thank you firerat for your help, dave -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
