#!/bin/sh
#USE fa2blc [filename optional]
if [ $1 ]; then input=$1   
 else echo "Please pick a input file"
      echo "These are .fa files are available:" 
      echo ; ls *.fa ; echo ; echo -n "Which one?  " ;read input
fi 
root=`echo $input |awk -F . '{print ($1)}'`

clustalw -align -outorder=input -infile=$input -output=gcg
msf2blc -q > $root.msf < tEmP
sed '/iteration/,/endoffile/ s/\./ /g' tEmP < $root.blc
rm -f tEmP

echo;  echo; echo "         Thank you.  Drive through."; echo