From owner-freebsd-questions Thu Jun 7 19:49: 2 2001 Delivered-To: freebsd-questions@freebsd.org Received: from xyzzy.intranet.snsonline.net (dhcp.looksmart.com.au [202.53.47.178]) by hub.freebsd.org (Postfix) with ESMTP id 2583E37B405 for ; Thu, 7 Jun 2001 19:48:57 -0700 (PDT) (envelope-from msergeant@snsonline.net) Received: from xyzzy.intranet.snsonline.net (localhost [127.0.0.1]) by xyzzy.intranet.snsonline.net (8.11.3/8.11.3) with SMTP id f582lph25898; Fri, 8 Jun 2001 12:47:57 +1000 (EST) (envelope-from msergeant@snsonline.net) Message-Id: <200106080247.f582lph25898@xyzzy.intranet.snsonline.net> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "Mark Sergeant" To: "mail_box_of_mine@yahoo.com" , freebsd-questions@FreeBSD.ORG Subject: Re: ? change *.cpp to *.c X-Mailer: Pronto v2.2.5 On freebsd/mysql Date: 07 Jun 2001 21:47:50 EST Reply-To: "Mark Sergeant" In-Reply-To: <20010607194434.EEC8.MAIL_BOX_OF_MINE@yahoo.com> References: <20010607194434.EEC8.MAIL_BOX_OF_MINE@yahoo.com> 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 A simple script would do the trick, something along the lines of.. #!/bin/sh for i in *.cpp do mv $i `echo $i | sed 's/\.cpp/\.c/g'` done Something along those lines anyways. On Thu, 07 Jun 2001 19:46:59 -0700, mail_box_of_mine@yahoo.com said: > hi, > I'm a Unix new learner. I want to change many ".cpp" files to > ".c" files. However, when I type "mv *.cpp *.c", it does not work. > However, in dos, "ren *.cpp *.c" works. Is there any easy way to do > this in Unix without write a shell program? > > Thanks in advance > > best regards, > steven > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > > -- Mark Sergeant Unix Systems Administrator Fortune follows... Snacktrek, n.: The peculiar habit, when searching for a snack, of constantly returning to the refrigerator in hopes that something new will have materialized. -- Rich Hall, "Sniglets" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message