TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:21324] Probably an easy sh/perl question...
Troy A. Johnson allegedly wrote:
> "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. ;-)
LOL!
No, sed is the better option. ;^l
Adios,
Chris
--
C.S. Cornuelle
School of Mathematics/MCIM, University of Minnesota
206 Church St. SE, Minneapolis, MN 55455
(612) 626-8930v, (612) 624-2333f, bob at math.umn.edu
Ferventer Vestite