I have a file called rc-addition that contains:

# BEGIN project
a
bunch
of
lines
# END project


I want to append it to the end of /etc/rc.machine but if there is already a
"# BEGIN project" / "# END project" it should replace that text, or delete
it and append the new text to the end.

This sounds like a job of sed but my sed fu is weak.

Who can do this in 1 line?

Tom
_______________________________________________
Discuss mailing list
Discuss@lopsa.org
http://lopsa.org/cgi-bin/mailman/listinfo/discuss
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to