building LFS: my settings

Tommy Wareing tommyw at
Fri Jul 6 05:17:34 PDT 2001

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

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