#! /bin/dash # # GUI for batch spreadsheet PATH="/usr/bin"; export PATH prog=$(basename "$0") eval="$1" range="$2" fname="$3" # check/set default values # #-- if [ -z "$eval" ]; then #-- eval=" " #-- fi # if [ -z "$range" ]; then range="a0:a9" fi # if [ -z "$fname" ]; then fname="$prog" fi # check/remove old plot files # if [ -s "rm.list" ]; then rm -f $(cat rm.list) rm.list fi # gif="$$.gif" echo "$gif" > rm.list # get/check option # read option # values="" formulas="" pointers="" values_command="" formulas_command="" pointers_command="" formats_command="" symbols_command="" lines="" points="" plot="" splot="" save="" image="" # # if [ -z "$option" ]; then values="checked" values_command=" print values;" symbols="checked" symbols_command=" print symbols;" lines="checked" points="checked" else # case "$option" in *Values*) values="checked" values_command=" print values;" ;; esac # case "$option" in *Formulas*) formulas="checked" formulas_command=" print formulas;" ;; esac # case "$option" in *Pointers*) pointers="checked" pointers_command=" print pointers;" ;; esac # case "$option" in *Formats*) formats="checked" formats_command=" print formats;" ;; esac # case "$option" in *Symbols*) symbols="checked" symbols_command=" print symbols;" ;; esac # case "$option" in *Lines*) lines="checked" ;; esac # case "$option" in *Points*) points="checked" ;; esac # case "$option" in # plot image was displayed, affects save *plot2d*) image="plot2d" splot="plot" ;; *plot3d*) image="plot3d" splot="splot" ;; esac # case "$option" in *Plot2D*) plot="plot2d" splot="plot" ;; *Plot3D*) plot="plot3d" splot="splot" ;; *Save*) save="1" if [ -n "$image" ]; then plot="$image" gif="$fname.gif" fi ;; esac fi # set linespoints # if [ "$lines" = "checked" ]; then if [ "$points" = "checked" ]; then linespoints="with linespoints" else linespoints="with lines" fi elif [ "$points" = "checked" ]; then linespoints="with points" else linespoints="" fi # create web page # echo "