Path: utzoo!mnetor!uunet!steinmetz!davidsen From: davidsen@steinmetz.ge.com (William E. Davidsen Jr) Newsgroups: comp.unix.questions Subject: Re: Need a file renaming facility Message-ID: <10612@steinmetz.ge.com> Date: 27 Apr 88 18:03:10 GMT References: <3564@fluke.COM> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 16 As long as the rename is the way you describe, "rename a file with a suffix to be the same name without the siffix" the solution is easy. It used sh (or ksh) as written: for src in *.suffix # all names of this type do dest=`basename $src .suffix` # strip the suffix mv $src $dest # and move the file done I don't have access to a pure BSD system to see if basename is there; it's in Ultrix and SunOS which are as close as I come. -- bill davidsen (wedu@ge-crd.arpa) {uunet | philabs | seismo}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me