LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   how to understand this shell code? (https://www.linuxquestions.org/questions/linux-from-scratch-13/how-to-understand-this-shell-code-675452/)

nillgump 10-10-2008 03:35 AM

how to understand this shell code?
 
I am new to LFS.
when I got to the STEP 5.7 Adjusting the Toolchain I got some problem.
perhaps I should understand the below code:

mv -v /tools/bin/{ld,ld-old}
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
gcc -dumpspecs | sed 's@^/lib/ld-linux.so.2@/tools&@g' > `dirname $(gcc -print-libgcc-file-name)`/specs
GCC_INCLUDEDIR=`dirname $(gcc -print-libgcc-file-name)`/include &&
find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; &&
rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` &&
unset GCC_INCLUDEDIR


Thanks your help!

w3bd3vil 10-10-2008 04:19 AM

That is a shell script, Shellcode is pretty different. ;)
Anyhow what sort of a problem are you facing?
All of the commands are pretty basic...


All times are GMT -5. The time now is 04:06 PM.