reply:using mask for sites

Kenn Gardels gardels at ced.berkeley.edu
Tue Jun 16 19:12:11 EDT 1992


In terms of using exclusively interactive commands in a shell script,
you can use a csh "here is" block.  I havn't tried doing that with 
s.menu, but have with some other interactive tools.  It just requires
mapping out ahead of time exactly what the sequence of responses is
going to be.  For example (and I am absolutely making this up in mail
- this is not a real s.menu sequence):

	s.menu << EOF
	3
	$file
	y
	$file.new
	n
	q
	EOF

This is just like typing those same commands to s.menu.  Note that the
parser may see the << EOF token and reject this approach.  Is so, you
can use $GISBASE/etc/bin/main/inter/s.menu, but note that if you do
you're flying without a parachute (ie syntax error checking).

-kenn



More information about the grass-user mailing list