
#!/bin/sh
# File  : get_vol_and_quota
# By    : MaartenDeBoer.nl, 090622
# Subject       : Get volume & Quota info
set -x

PGM="`basename $0 | cut -d. -f1`"
TMP="/tmp/${PGM}.$$"
LOG="$HOME/log/${PGM}.log"
FILERS="$HOME/etc/filers"
MAILTO="maarten.deboer@atosorigin.com"
CSV="{PGM}.csv"

for FILER in `cat ${FILERS} | grep -v '#' | grep naf05`
do
  echo "${FILER} ..."
  ssh -n ${FILER} storage show adapter | egrep 'Slot|State|Use|FC Node Name'>> ${TMP}
done

#cat ${TMP} | awk 'BEGIN {RS=""}
#{
#  t=0
#  while (++t<=NF) {printf "%s ", $t}
#  printf "\n"
#}'file

cat ${TMP} 

#cat ${TMP} | uuencode ${CSV} | mailx -s "${PGM}" ${MAILTO}

rm ${TMP}
exit

