shell script to build fst from nbest