#!/bin/sh # In this script $# stands for the number of arguments, not including the # command name. $0 is the command name, $1 the first argument, and so # on. For instance, typing # # makefont grreg10 alw 1 # # to the UNIX shell gives the same result as typing # # cmmf '\mode:=alw;mag:=magstep(1);batchmode;input grreg10' # case $# in 0) echo $0 source [ mode [ mag ]];; 1) cmmf '\mode:=localmode;batchmode;input '$1;; 2) cmmf '\mode:='$2';batchmode;input '$1;; 3) cmmf '\mode:='$2';mag:=magstep('$3');batchmode;input '$1;; esac