I need to add the following line to the end of a config file:
include \"/configs/projectname.conf\"
to a file called lighttpd.conf
lighttpd.conf
use awk
awk 'FNR==NR && /configs.*projectname\.conf/{f=1;next}f==0;END{ if(!f) { print "your line"}} ' file file