Hi<br><br>I&#39;m not familiar with bash scripting, I want to write a script that starts GRASS and create a new LOCATION and a MAPSET, specify the coordinate system for my database, specify a geodetic datum for the LOCATION, import datasets into the GRASS, do watershed analysis on the DEM data set, convert DEM raster into vector, and then calculate univariate statistics from a GRASS raster map. <br>
<br>Can you guys help me with this? I tried to write a script and I got stucked, see below:<br><br>#!/bin/sh<br><br>#variable to customize:<br># path to GRASS software main directory<br>GISBASE=/usr/bin/grass64<br># path to GRASS database<br>
GISDBASE=$HOME/grassdem <br><br># nothing to change below<br>#MAP=PERMANENT<br>#LOCATION=SRTMDEM<br><br><br># generate temporal LOCATION:<br>LOCATION=srtmdem<br>mkdir -p $GISDBASE/$LOCATION/PERMANENT<br><br># save existing $HOME/.grassrc6<br>
if test -e $HOME/.grassrc6 ; then<br>mv $HOME/.grassrc6 /$HOME/grassdem/$LOCATION.grassrc6<br>fi<br><br>echo &quot;LOCATION_NAME: $LOCATION&quot; &gt; $HOME/.grassrc6<br>echo &quot;MAPSET:tmp&quot; &gt;&gt; $HOME/.grassrc6<br>
echo &quot;DIGITIZER: none&quot; &gt;&gt; $HOME/.grassrc6<br>echo &quot;GISDBASE: $GISDBASE&quot; &gt;&gt; $HOME/.grassrc6<br>export GISBASE=$GISBASE<br><br><br><br><br clear="all"><br>-- <br>Kind Regards<br>TS Gumede<br>
CSIR, Meraka Institute<br>072 258 1650<br><br>