diff options
author | Ian C <ianc@noddybox.co.uk> | 2017-06-15 13:43:12 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2017-06-15 13:43:12 +0000 |
commit | fb5ab259dd99839678a57f70b22ec013c852c7e3 (patch) | |
tree | 399bd38c209be252ea1a1dcd106b78034bff7fca | |
parent | 3bfb794dc58dc97fb9d12be96da51a560dbc3163 (diff) |
Added mcp and mmv.
-rwxr-xr-x | mcp | 18 | ||||
-rwxr-xr-x | mmv | 18 |
2 files changed, 36 insertions, 0 deletions
@@ -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 @@ -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 mv $i $new + mv $i $new +done |