Ncurses: sed to add -pie -fpie

Timo Kamph timo at kamph.org
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}/Makefile.in
> 
> 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}/Makefile.in

'\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.



	Timo



More information about the hlfs-dev mailing list