<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
I found the solution...again, I had to ensure that the program was reading from the correct path.<br><br>Andrew<br><br><hr id="stopSpelling">From: andrew.lewin@sympatico.ca<br>To: hamish_b@yahoo.com; neteler@osgeo.org<br>Subject: RE: [GRASS-user] Running Scripts in GRASS<br>Date: Wed, 19 Aug 2009 12:47:51 +0000<br>CC: grass-user@lists.osgeo.org<br><br>
<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</style>
Thanks to all of you who helped solve my problem.<br><br>I was able to run the script from the folder where the files I needed to process were stored. <br><br>I still have to tweak the script as the program says that it doesn't recognize "*". The script uses the "*" symbol in the following manner:<br><br><pre>for file in A*_MO_CHLO_4 ; do<br> echo "map: $file"<br><br> gdal_translate -a_srs "+init=epsg:4326" -a_nodata 65535 \<br> -a_ullr -180 90 180 -90 -co "COMPRESS=PACKBITS" \<br> $file ${file}_prep.tif<br><br> r.in.gdal in=${file}_prep.tif out=$file<br>done<br></pre>Can anyone tell me the language the program is in? I am not familiar with it and it would be good to know more about it.<br><br>Thanks again for your help.<br><br>Andrew<br><br>> Date: Tue, 18 Aug 2009 18:04:59 -0700<br>> From: hamish_b@yahoo.com<br>> Subject: Re: [GRASS-user] Running Scripts in GRASS<br>> To: andrew.lewin@sympatico.ca; neteler@osgeo.org<br>> CC: grass-user@lists.osgeo.org<br>> <br>> Markus wrote:<br>> > Perhaps we should cook up a Wiki page describing this briefly?<br>> <br>> <br>> shrug. or as it's an external task, delegate the matter and add a link to some good document on the web about unix shell scripting. I'm sure there are many out there already. (but<br>> whatever)<br>> <br>> <br>> Andrew, another thing to realize is that these are just terminal prompt commands strung together via cut and paste into a file.<br>> <br>> Also the wiki instructions were not written with a script in mind, so you will probably have to adjust a few filenames etc by hand.<br>> <br>> I just updated the simple XY method example to use the new<br>> 'r.in.gdal -l' directly into a lat/lon location, but I think<br>> the gdal_translate method is better.<br>> <br>> <br>> typically shell scripts are given a shebang line which looks<br>> like:<br>> <br>> #!/bin/sh<br>> <br>> this tells the OS that when you run the program it should use<br>> the shell program (found in /bin/sh) to run it.<br>> <br>> <br>> <br>> Hamish<br>> <br>> <br>> <br>> <br>> <br></body>
</html>