<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:verdana,helvetica,sans-serif;font-size:10pt"><div>Hello all,<br><br>I have been having a go at upgrading a basic bash script that I made to run a series of commands in GRASS. I would like the script to ask the user for two input files (one internal to the location i.e. an @PERMENANT and the other and external .asc) and an prefix to the output files of the process.<br><br>So far I have tried this bit of script to enter the GRASS raster, but it fails to prompt. All other commands (i.e. g.list rast) work fine.<br><br>g.list rast<br>g.findfile type=old elem=cell_misc prompt="Enter raster name " unixfile=cur_raster<br>. cur_raster<br>if [ ! "$file" ]<br>&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit<br>fi<br>RAST=${name}<br><br><span>Can anyone point out where I'm doing wrong and/or point me in the direction of some more
 advanced tutorials and information for GRASS scripting than I have found here <a target="_blank" href="http://grass.fbk.eu/gdp/grass5tutor/HTML_en/c1806.html">http://grass.fbk.eu/gdp/grass5tutor/HTML_en/c1806.html</a></span><br><br>Many thanks for reading,<br>Rebecca<br><br></div><div style="font-family: verdana,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Rich Shepard &lt;rshepard@appl-ecosys.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> grass-users@lists.osgeo.org<br><b><span style="font-weight: bold;">Sent:</span></b> Thu, 17 March, 2011 16:53:56<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [GRASS-user] How To Identify db.copy Error?<br></font><br>On Thu, 17 Mar 2011, Micha Silver wrote:<br><br>&gt; "Offset" is a postgres (SQL) reserved word. Can you
 change that column<br>&gt; name in the dbf?<br><br>&nbsp; Yep. Emacs (of course!) works well. I changed it to setoff and postgres<br>is happy. I've a couple of other files that throw errors, but the issue is<br>not reserved words. Later today I'll go look for a dbf-&gt;csv filter. Then I<br>can clean the text file and copy it into postgres.<br><br>Thanks, Micha,<br><br>Rich<br>_______________________________________________<br>grass-user mailing list<br><a ymailto="mailto:grass-user@lists.osgeo.org" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br></div></div>
</div><br>



      </body></html>