> I need help figuring out how to rename multple files. The files are > named like reports_abcdef_YYYYMMDD.dat, reports_hijklm_YYYYMMDD.dat, > and reports_nopqrs_YYYYMMDD.dat. Here is an example. > > Original Filename: reports_abcdef_YYYYMMDD.dat > New Filename: abcdef_YYYYMMDD.dat > > Let me know how I can do this. Thanks.
there are plenty of methods for this. one is: for file in `ls -1 /path/to/files`; do mv $file `echo $file | sed -e 's/^reports_//g'` done joe _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"