when you want to copy or move files to slightly different names (e.g. replacing only one letter in the filename), you can use
1
| for i in `ls *`; do cp $i `echo $i | sed "s/search/replace/g"`; done |
for i in `ls *`; do cp $i `echo $i | sed "s/search/replace/g"`; done
found on http://www.minihowtos.net/copy-and-rename-multiple-files
This entry was posted
on Thursday, August 30th, 2012 at 20:37 and is filed under misc.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.