> Trying to avoid a perl script which wouldn't be hard, but I am looking > for an awk one liner that does a replacement, but only after it sees a > key word on some line. > > Anyone know of that's easy to do? {if ( $0 ~ /<keyword>/) (sub(str, repl);} print $0;} mark