sed puzzle

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Nathan Aubrey
Date:  
To: PLUG Discussion List
Subject: sed puzzle

All,

I need to replace some words with other words, but sometimes the words are not
present, so I need to add the words.
In a config file I use, it has the following field

KIDS     :
Mother   : Amanda
Father   : Scott



It is easy to swap out the names of mother or father, as the variables are
there, but if I try to swap out a kids name and there is no kids name already
in place, how do I add it instead? Is it one command, or must I test if the
content is empty then add instead of replacing?

The field example cannot change as it's just the format I use...
I appreciate any insite, sed is a great tool, but man! what a beast!

nathan
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss