TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:21324] Probably an easy sh/perl question...
"John J. Trammell" wrote:
>
> > Anyone know an easy way to change all of these files? It is going to have
> > to involve some reg-exp because the variable is sender = owner-listname
> > which needs to be changed to listname-owner.
>
> How about something like:
>
> perl -pi.bak -e 's/(\w+)\s*=\s*(\w+)-(\w+)$/$1 = $3-$2/' <filenames>
>
Oh, don't make him do that! He doesn't think in Perl yet. ;-)