]> Sergey Matveev's repositories - dotfiles.git/blobdiff - bin/bin/mv-hsh
Why the hell I still used SHA?
[dotfiles.git] / bin / bin / mv-hsh
diff --git a/bin/bin/mv-hsh b/bin/bin/mv-hsh
new file mode 100755 (executable)
index 0000000..fe7ee92
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+[ $# -eq 0 ] && fs="$(find . -maxdepth 1 -type f)" || fs="$@"
+for f in $fs ; do
+    mv -v "$f" $(b3sum < "$f").${f##*.}
+done