Permalink
Browse files

add script to rename files by regex

  • Loading branch information...
1 parent 4bc704a commit 74bfe5cbaa89b70623f59f7b20e8ff5260cef39c @garybernhardt committed Mar 6, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 bin/rename
View
@@ -0,0 +1,8 @@
+#!/usr/bin/env zsh
+#
+set -e
+
+SUBSEXPR=$1
+shift
+for i in $@; do mv -i "$i" "$(echo "$i" | sed $SUBSEXPR)"; done
+

2 comments on commit 74bfe5c

@garybernhardt
Owner

this works fine

Please sign in to comment.