patches vs sed

Seth W. Klein sk at
Sun Sep 22 07:43:32 PDT 2002

Greg Schafer <gschafer at> wrote:
> <trim>
> Simple seds are fine.
> Complex seds should be replaced with patches.
> What prompted me to write this was the latest man commands:-
> sed -e '/^PAGER/s/-is/-isR/' \
>     -e 's%MANPATH[[:space:]]/usr/man%#MANPATH /usr/man%' \
>     src/man.conf.backup > src/man.conf &&
> That is bordering on complex and could likely be replaced with a patch.
> Just MHO of course.

I agree. Setting a sed like this loose in something i'm going to
install frightens me. A patch, i can trust. If i read it, i know
exactly what it will do.

Seth W. Klein
sk at                   
Maintainer, LFS FAQ       
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