[CentOS] awk global replacement only after keyword
m.roth at 5-cent.us
m.roth at 5-cent.usFri Mar 26 13:31:48 UTC 2010
- Previous message: [CentOS] awk global replacement only after keyword
- Next message: [CentOS] Rsync: how big is the traffic?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> 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
- Previous message: [CentOS] awk global replacement only after keyword
- Next message: [CentOS] Rsync: how big is the traffic?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list