#!/bin/sh pname="vtm" #### this version handles parameter parsing in sh eval `vshparse of= - with $0 $*` #### the matlab script follows the next line matlab -nodisplay -nojvm -nodesktop -nosplash > /dev/null << EOF % declare any command line parameters if strcmp('$OPT', '-') fprintf(2, '$pname: V4 matlab template\n') fprintf(2, '[if= ] input file\n') fprintf(2, '[of= ] input file\n') fprintf(2, '[-v ] visible mode\n') exit end system ( ['vcp ' ' if=' $if ' $OPTv of=' $of ]); EOF