#!/bin/sh [ $# -eq 0 ] && fs="$(find . -maxdepth 1 -type f)" || fs="$@" for f in $fs ; do mv -v "$f" $(sha1 -q "$f").${f##*.} done