Posted By

benpjohnson on 03/29/07


Tagged

sed find rename


Versions (?)

Example of Fancy File Renaming


 / Published in: Bash
 

  1. find . -name *.php3 | sed 's/\(.*\).php3$/mv & \1.php/' | sh
  2. sudo find . -name "BULUSHI-CLOTHES-RANGE-*" | sed 's/BULUSHI-CLOTHES-RANGE-\(.*\)/mv & \1/' | sed 's/^\.\/\(.*\)/\1/' | sh

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: benpjohnson on April 23, 2008

Upper case can be done with: tr "[:lower:]" "[:upper:]"

You need to login to post a comment.