summaryrefslogtreecommitdiff
path: root/fmt/deprefix
diff options
context:
space:
mode:
Diffstat (limited to 'fmt/deprefix')
-rwxr-xr-xfmt/deprefix6
1 files changed, 6 insertions, 0 deletions
diff --git a/fmt/deprefix b/fmt/deprefix
new file mode 100755
index 0000000..da51657
--- /dev/null
+++ b/fmt/deprefix
@@ -0,0 +1,6 @@
+#!/bin/sh
+# deprefix
+# Remove the prefix from all files in the directory which have the prefix.
+# deprefix "pref-"
+
+for i in "$1"*;do mv "$i" "${i#"$1"}";done