#!/bin/bash
if [ $# -lt 2 ]; then
echo Missing arguments...
echo "Use: process.sh 'input dir' 'output dir'"
exit 1
fi
if [ -d $1 ]; then
for file in `ls $1`
do
qsub -cwd -p -512 run.sh $1$file $2
done
else
echo "Missing or incorrect input directory..."
exit 1
fi
and the actual run.sh script is just a small java program, which takes our two parameters.
java -Xmx1024m -jar $HOME/data/jars/DataExtractor-0.1.jar $1 $2