On 2007-06-18 11:33, Olivier Regnier <[EMAIL PROTECTED]> wrote:
> I founded solution with awk command and that works well.
> cat /usr/local/etc/pkgtools.conf | awk '{ sub(/^[ \t]*MAKE_ARGS = {/, 
> "&\n\t\x27ports-mgmtp/portupgrade\x27 => 
> \x27WITH_BDB4=1\x27,\n\t\x27sysutils/fastest_csvsup\x27 => 
> \x27WITH_ROUNDTRIP=1\x27,\n\t\x27mail/nbsmtp\x27 => \x27WITH_IPV6=1 
> WITH_SSL=1\x27,\n"); print; }' > /usr/local/etc/pkgtools.conf

I'm sure you really do *NOT* want to read and write to the same file in
a single shell pipeline.  Watch out for the cookie monster which feeds
on the remains of zeroed out files :-P

freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to