Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.


  Search this Thread
Old 10-10-2008, 03:35 AM   #1
LQ Newbie
Registered: Oct 2008
Posts: 7

Rep: Reputation: 0
Question 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/' > `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}/*` &&

Thanks your help!
Old 10-10-2008, 04:19 AM   #2
Senior Member
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
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...


code, shell

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the fastest way to understand other people's code lucky6969b Programming 17 03-21-2006 02:30 PM
help to understand this code cranium2004 Programming 1 03-21-2005 11:35 AM
Help me understand this Driver code! fbarre Linux - Newbie 2 09-24-2003 05:10 PM
Help me understand this Driver code! fbarre Linux - General 2 09-24-2003 12:51 PM

All times are GMT -5. The time now is 05:02 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration