$ ls -1 BMRR_Pits.cpg BMRR_Pits.dbf BMRR_Pits.prj BMRR_Pits.shp BMRR_Pits.shx
$ rename 's/^BMRR_//' BMRR_* $ ls -1 Pits.cpg Pits.dbf Pits.prj Pits.shp Pits.shx Regards, - Robert On Fri, Feb 8, 2019 at 1:05 PM Rich Shepard <[email protected]> wrote: > I have a directory with 30 files. Each filename begins with BMRR_ and I > want > to strip that off, leaving the rest of the name unchanged. There are 5 > different extensions on the files. > > I've used rename to change file extensions but not characters at the front > or middle of filenames. My web searches (after a couple of futile efforts > with sed and rename) found a number of suggestions for removing a string > within each filename or characters at the end of each file name. I tried > modifying each suggestion to remove the 5 initial characters but none > worked. > > There are six sets of five files; one set is: > BMRR_Pits.cpg BMRR_Pits.dbf BMRR_Pits.prj BMRR_Pits.shp BMRR_Pits.shx > > Suggestions needed. > > TIA, > > Rich > _______________________________________________ > PLUG mailing list > [email protected] > http://lists.pdxlinux.org/mailman/listinfo/plug > _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
