Date: 07 Jun 2001 21:47:50 EST From: "Mark Sergeant" <msergeant@snsonline.net> To: "mail_box_of_mine@yahoo.com" <mail_box_of_mine@yahoo.com>, freebsd-questions@FreeBSD.ORG Subject: Re: ? change *.cpp to *.c Message-ID: <200106080247.f582lph25898@xyzzy.intranet.snsonline.net> In-Reply-To: <20010607194434.EEC8.MAIL_BOX_OF_MINE@yahoo.com> References: <20010607194434.EEC8.MAIL_BOX_OF_MINE@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106080247.f582lph25898>