eos root://${EOSINSTANCE}ls-y${EOS_DIR} | sed-e's/^\(d.::t.\).*\(test[0-9]\+\)$/\2 \1/;s/d[^0]::t[^0]/retrieved/;s/d[^0]::t0/copied/;s/d0::t0/error/;s/d0::t[^0]/tapeonly/'>${STATUS_FILE}
echo"RAW STATUS_FILE (${STATUS_FILE})"
cat${STATUS_FILE}
echo"LIST OF RETRIEVED FILES"
for RETRIEVED_FILE in`cat${STATUS_FILE} | grep retrieved | awk'{print $NF;}'`;do
# The format of the STATUS_FILE is two space separated columns per line. The
# first column is the name of the file and the second is the status of the file.
# For example:
#
# test0000 retrieved
# test0001 retrieved
# test0002 retrieved
# test0003 retrieved
echo"CHECKING sys.retrieves HAS BEEN RESET FOR EACH RETRIEVED FILE"
for RETRIEVED_FILE in`cat${STATUS_FILE} | grep retrieved | awk'{print $1;}'`;do