if [ ! -n "$1" ] then echo "Usage: `basename $0` ()" exit 1 fi file=$1 python="python" if [ -n "$2" ] then python=$2; else echo "using default python" fi source venv/bin/activate basepath=`basename $file` dirname=`dirname $file` out_file="$dirname/char_clust_$basepath" if [ ! -f "$out_file" ] then cmd="$python src/char_clust.py -v -i $file -H" $cmd > $out_file fi