for bufr in *.bufr do diag=`bufr_decode_all -i $bufr 2>&1 | ruby classify.rb` ahl=`expr substr "$bufr" 3 10` echo "${ahl}: ${diag}" done