Subject: Re: "OneLiner" - replacement
From: Mark Thomas <mrt thomaszone.com>
Date: Tue, 26 Feb 2008 01:04:57 +0900
References: 292448
First, I don't think the * is doing what you think it is. 'ruby -
pi.bak' is probably what you want. Second, it's more efficient to use
one regex when you don't really need two.
ruby -pi.bak -e 'gsub(/VAR_(TYP|FREQ)/,'\1')' file.dat