building LFS: my settings

Gerard Beekmans gerard at
Fri Jul 6 06:07:22 PDT 2001

On Fri, Jul 06, 2001 at 01:17:34PM +0100, Tommy Wareing wrote:
> On Fri, Jul 06, 2001 at 08:03:50AM -0400, Gerard Beekmans wrote:
> > >         sed -e 's,^,\\\(^,' -e 's, ,$\\\)\\\|\\\(^,g' -e 's,$,$\\\),'`
> > 
> > Yeah isn't it great? I have no idea what it does, but according to
> > /usr/bin/updatedb (where I got the prunepath code from) it works and so
> > far it has done an excellent job at whatever it is doing
> s,^,\\\(^, # Inserts the string "\(^" at ( start of every line.
> s, ,$\\\)\\\|\\\(^,g # replaces every space with the string "$\)\|\(^"
> s,$,$\\\), # appends the string "$\)" at the end of every line.
> The result is that a string of space separated words (such as "a
> string of space separated words") is changed into a set of alternating
> regular expressions, each of which matches its selected word against
> an entire line
> ("\(^a$\)\|\(^string$\)\|\(^of$\)\|\(^space$\)\|\(^separated$\)\|\(^words$\)")

Wow and who would've come up with that ;)

Must've been somebody bored to tears one day and started regexing.

Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-
Unsubscribe: send email to lfs-discuss-request at
and put unsubscribe in the subject header of the message

More information about the lfs-dev mailing list