summaryrefslogtreecommitdiff
path: root/mcp
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2017-06-15 13:43:12 +0000
committerIan C <ianc@noddybox.co.uk>2017-06-15 13:43:12 +0000
commitfb5ab259dd99839678a57f70b22ec013c852c7e3 (patch)
tree399bd38c209be252ea1a1dcd106b78034bff7fca /mcp
parent3bfb794dc58dc97fb9d12be96da51a560dbc3163 (diff)
Added mcp and mmv.
Diffstat (limited to 'mcp')
-rwxr-xr-xmcp18
1 files changed, 18 insertions, 0 deletions
diff --git a/mcp b/mcp
new file mode 100755
index 0000000..9a18825
--- /dev/null
+++ b/mcp
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+if [ -z "$3" ] ; then
+ echo usage: $0 from to file_list
+ exit 1
+fi
+
+from="$1"
+to="$2"
+
+shift
+shift
+
+for i in $* ; do
+ new=$(echo $i | sed "s/$from/$to/g")
+ echo cp $i $new
+ cp $i $new
+done