Ch5: "Locking in" glibc, Ch6: Adjusting toolchain

Edwin van Vliet cheatah at
Thu Jun 5 01:31:46 PDT 2003

> My only comment would be that the book is showing you how to build a
> Linux system. It is not a regex tutorial. The important concept is
> changing the location of those libraries, not some tricky bit using
> Therefore, it really doesn't matter which sed expressions are used.

I think you're right at that point, but at least make it a valid
expression that does exactly what we want it to do, and nothing more or
less. The most significant suggestion was to use the & reference (the
matched pattern), so less typing is necessary. A single line of text can
explain that the sed command can be used for replacing a _pattern_,
which doesn't necessarily have to be a fixed string. Therefore, I think
usage of the dot (.) is wrong, as people might think they can just use
any string, which obviously isn't true. Special characters should be
escaped. If someone wants to know why, he can man sed or man regex for
an answer.

I'm just saying that I would prefer the following command:

sed -e 's@/lib/ld\.so\.1@/stage1&@g' \
   -e 's@/lib/ld-linux\.so\.2@/stage1&@g' \

The only extra two things that might need an explanation are the '&'
chatacter, and the '\.' instead of '.'

Unsubscribe: send email to listar at
and put 'unsubscribe lfs-dev' in the subject header of the message

More information about the lfs-dev mailing list