Skip to content

Instantly share code, notes, and snippets.

@stanwu
Created July 24, 2012 11:39
Show Gist options
  • Save stanwu/3169511 to your computer and use it in GitHub Desktop.
Save stanwu/3169511 to your computer and use it in GitHub Desktop.
create md5 check sum
#!/bin/sh
for i in `ls | grep -v md5$ | grep -v txt$`
do
if [ -s "$i.md5" ]; then
echo "$i had md5sum"
else
echo "Create $i"
md5sum "$i" > "$i.md5"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment