Date: Tue, 18 Dec 2001 11:21:35 -0800 From: "Kevin Oberman" <oberman@es.net> To: "Anthony Atkielski" <anthony@freebie.atkielski.com> Cc: "Magnus B{ckstr|m" <b@etek.chalmers.se>, "FreeBSD Questions" <freebsd-questions@FreeBSD.ORG> Subject: Re: Command to make modifications on multiple files Message-ID: <200112181921.fBIJLZd21693@ptavv.es.net> In-Reply-To: Your message of "Tue, 18 Dec 2001 12:24:18 %2B0100." <009301c187b6$88994bf0$0a00000a@atkielski.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> From: "Anthony Atkielski" <anthony@freebie.atkielski.com> > Date: Tue, 18 Dec 2001 12:24:18 +0100 > Sender: owner-freebsd-questions@FreeBSD.ORG > > Hmm ... I was kind of hoping for a single command that would do it for me, > so I wouldn't have to debug something I'd write myself. However, I'll > consider this, if I can't find anything ready-made. I'd prefer not to write > a script of my own and discover a bug in it the hard way, which would mean a > lot of restoring. There is a tool to do this in ports, misc/mmv. It allows for the use of wildcards in the source (don't forget to escape them to get around the shell) and the ability to insert the matching pattern in the destination. mmv -r test\*.dat old-stuff=1.dat will rename (-r) all files matching test*.dat, replacing "test" with "old-stuff". Of course, REAL Unix users will always use shell to do this! :-) (I'm not a REAL Unix user.) R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112181921.fBIJLZd21693>