ASCII Parameter Shell Script Example

In this example, skymap is used in a shell script which prints a series of finder charts centered on the stars in a catalog. The catalog pathname, enclosed in quotes so the slashes are not mistakenly assumed to be comment delimiters, is initialized by the first skymap call. So that string matches are exact, the limiting values are gotten from skymap in the same way that the values with which they will be compared are. a is set to the initial value of 1, and b to one value past the final desired star in the next two invocations of skymap. Within the loop, skymap is executed once for each star, producing a map of which a hard copy is made by pstek. 1 is added to cstar, and a is set to the new value of cstar. The loop continues until a is equal to b, that is until cstar is increased to 11.
	skymap menu=n sfname="mkp.so" sfdir="/home/mink/Stars/occult" stop
	b=`skymap parval=y cstar=11 cstar`
	a=`skymap parval=y cstar=1 cstar`
	while test "$a" != "$b"
	    do
	    skymap
	    pstek skymap.plot
	    echo hardcopy for star `skymap cstar` in queue `date`
	    skymap cstar+1 stop
	    a=`skymap cstar`
	    done
	skymap menu=y stop
[Parameters]