#!/bin/bash
. /etc/sysconfig/eos

if [ "x$1" = "x" ] ; then
# input parameter is the path to query e.g. eos-srm-checksum <file-path>
    echo "usage: eos-srm-checksum <filepath>"
    exit -1;
fi

chksum=`eos -b ${EOS_MGM_URL-root://eosatlas.cern.ch//} file info $1 -checksum | grep xs: | awk '{print $2}' 2>/dev/null`
echo $chksum