#!/bin/bash
file="$1" # the input file
shift # important as any remaining options are passed on to Frobby
# make input file $file.out.mat from $file in the format that 4ti2 expects
echo -n "1 " > $file.out.mat
wc $file | sed "s/ *[0-9]* *\([0-9]*\) *.*/\1/" >> $file.out.mat
cat $file >> $file.out.mat
# run 4ti2 to compute Grobner basis
4ti2-zbasis $file.out > /dev/null # make $file.out.lat (not required)
4ti2-groebner $file.out > /dev/null # make $file.out.gro
# run frobby to compute Frobenius number from Grobner basis
cat $file.out.gro $file | frobby optimize -chopFirstAndSubtract -maxStandard $*
|