b. f. wrote:
Alberto Mijares wrote:
snip

It would make sense if you read the sed(1) and re_format(7) manpages.
They may be a pain at first, but they are used often and can make your
life a lot easier.  There are also a lot of tutorial on the web, with
many useful examples, e.g.:

http://sed.sourceforge.net/grabbag/

He is suggesting that, rather than using sh(1), you should use sed(1),
which is typically used for this sort of task, and is also part of the
base system, in some fashion like, for example:

sed -e '/literal/d' file

If you insist on doing this with sh(1), which will probably be less
efficient, then you can cobble something together with a 'case'
statement, or parameter expansion with substring processing.  See the
sh(1) manpage.

I hope that you are not intending to use this for a FreeBSD Port in
the context of your earlier message.  As someone else has already told
you, ports should _not_ be automatically editing configuration files
like rc.conf.  Instead they should just indicate what should be added
by the user or administrator in a pkg-message. Although you are free
to do whatever you want on your own system, if you submit a port that
attempts to tamper with such files to FreeBSD Ports, it is likely that
that part of your submission will be rejected.

Thank you for your kind in-sight. Using sh was again just comments to help explain what I needed help with. A list reader replied offline with examples and now I have what I needed to proceed.
Thanks to all who replied.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to