Ncurses: sed to add -pie -fpie

Timo Kamph timo at
Sun Mar 13 06:14:22 PST 2005

> the sed command to add -pie -fpie to Ncurses:
> sed -e 's/^CFLAGS .*$/& -pie -fpie/' -i {progs,tack}/
> does not work for me. Both files are unchanged after executing it.

Ok, I figured it out, it's a tab character after CFLAGS.
Maybe the command should be changed to make that clear:

sed -e 's/^CFLAGS\t.*$/& -pie -fpie/' -i {progs,tack}/

'\t' is supported in all newer versions of sed. Or there should be a 
note in the text telling everybody that it's a tab and not a simple space.


More information about the hlfs-dev mailing list