From owner-freebsd-questions Tue Dec 18 11:21:43 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by hub.freebsd.org (Postfix) with ESMTP id BCAEE37B419 for ; Tue, 18 Dec 2001 11:21:40 -0800 (PST) Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (8.10.1/8.10.1) with ESMTP id fBIJLZd21693; Tue, 18 Dec 2001 11:21:35 -0800 (PST) Message-Id: <200112181921.fBIJLZd21693@ptavv.es.net> To: "Anthony Atkielski" Cc: "Magnus B{ckstr|m" , "FreeBSD Questions" Subject: Re: Command to make modifications on multiple files In-reply-to: Your message of "Tue, 18 Dec 2001 12:24:18 +0100." <009301c187b6$88994bf0$0a00000a@atkielski.com> Date: Tue, 18 Dec 2001 11:21:35 -0800 From: "Kevin Oberman" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > From: "Anthony Atkielski" > 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