<br><br><div class="gmail_quote">On Thu, May 31, 2012 at 9:40 AM, Rosca Bogdan <span dir="ltr"><<a href="mailto:roscao@gmail.com" target="_blank">roscao@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello!<br>How can I export multiple raster files created with r.basin with r.out.arc ( I need them to have *.asc extension). Is there a command line to do this in batch mode because I have around 170 files and it is a bit tedious. Please help.<br>


Thank you,<br>Bogdan Rosca<br></blockquote><div><br>The only way that I know, it's with a script. Here is an example that you can use:<br>
<br>
1. Create a plain text with the names of your input maps, line by line:<br>
map_name_1<br>
map_name_2<br>
map_name_3<br>
..<br>
<br>
If your maps have a pattern, like the example above, you can use the next line to create the file:<br>

<br>
g.mlist type=rast pattern=map_name* > names<br>
<br>
2. This a little script that would be useful for you purpose. Just put it on the terminal<br>
<br>
i=1<br>
for VAR in `awk '{print}' names`<br>
do<br>
    r.out.arc in=$VAR out=$VAR"_arc_"$i<br>

    i=`expr $i + 1`<br>
done <br>
<br>
I hope it helps you<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>_______________________________________________<br>
grass-user mailing list<br>
<a 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>
<br></blockquote></div><br><br clear="all"><br>-- <br>David Montoya González<br>Ing. Forestal, Universidad Nacional de Colombia<br>Laboratorio de Sistemas Complejos, UNAL Medellin<br><br>