#!/bin/sh
#
# Very simple script to go through the directories and calculate
# md5sum for each file (expect for those mentioned in the grep line
#
# USAGE:
#
# enter your selected directory
# run "md5checkdir >../cd.md5"
# (I suggest not to place the output file to the same directory
# as you will get one wrongly check summed file in it :-)
# after the command is done you should finaly move the file
# to the desired directory 
#
# this file is then simply used this way:
#
# enter your selected directory
# run "md5sum -c cd.md5"
# and wait for any error

find . -xdev -type f -printf "%p\n" |
grep -v ".xvpics" |
sed '-es/ /\\ /g'  "-es/'/\\\'/g" |
xargs --max-lines=1 md5sum | sed '-es/  \.\//  /g'

#sed '-es/\"//g'
#cut -f 1 -d ' ' |
