#!/bin/sh
#$ -N md5sum
#$ -cwd
#$ -l m_mem_free=3G
#$ -V

## Print md5sum of all files to out file.

## Feed file list from stdin (=$1).
## Adjust loop number according to wc -l of directory list:
max=$(cat $1 | wc -l)
num=$(seq 1 $max)

for i in $num

do
	IN=$(head -n $i $1 | tail -n 1)
	md5sum $IN >> md5sum.out
done


