Menu{Master,Maestro,etc} question(s)

Jay R. Ashworth jra at baylink.com
Thu May 10 06:34:28 PDT 2007


On Tue, May 08, 2007 at 11:47:32PM -0400, Fairlight wrote:
> perl -pi.bak -e '$line = shift; $sub = shift; while (<>) {if ($_ =~ /^${line}:/)
> {s/^(.+:[^:]+")[^"]+(".*)/$1${sub}$2/;}}' $2 $3 $1
> 
> I never use -pi so once I looked it up, I realised you didn't need the
> print; in there.  The important parts are the test and the regex anyway,
> but for the sake of not conflicting...

I think you actually don't need the "while", either, no?

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Designer                          Baylink                             RFC 2100
Ashworth & Associates        The Things I Think                        '87 e24
St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274


More information about the Filepro-list mailing list