source ~/.bashrc

# Filter
if [ -z "$1" && -z "$2" ]
  then
    echo "No filter arguments supplied"
    exit 1
fi

dataset_type=$1
dataset=$2

cd /data/joan/c3s512-wp1-datachecker/dqc_wrapper
DATA_DIR="/shared/cds_downloads/"
QAR_RES_DIR="/shared/QAR_dqc/results/"

for variable in `ls -1 ${DATA_DIR}/${dataset_type}/${dataset}/*`
do
	#zip=`basename $conf | sed s/.ini/.zip/g`
  echo ${variable}
  qar_filename=${dataset_type}-${dataset}-${variable}.zip
	# Avoid skipping
	if [ ! -f ${QAR_RES_DIR}/${dataset_type}/${dataset}/${qar_filename} ]; then
      echo ${qar_filename}
	fi

done
