if [ -f charscriptpattern ]; then
	if test "$#" != 2; then
		echo \*\*\*\*\* Wrong number \($#\) of arguments
		echo \*\*\*\*\* Usage\: calc \<GB_file.a\> \<characteristic\>
		exit
	fi
	echo Removing the old script...
	rm -f __charscript.sl __charscript.tmp
	sed ''/INSTANCE/s//$1/'' charscriptpattern > __charscript.tmp
	sed ''/CHARACTERISTIC/s//$2/'' __charscript.tmp > __charscript.sl
	__runCharbergbg $1 $2
else
	echo Cannot find \"charscriptpattern\" file, aborting...
fi

echo charbmcalc script done, but __runCharbergbg may run.
