[GRASS-user] creating loops in grass

Aaron Racicot aaronr at z-pulley.com
Mon Jul 9 19:25:26 EDT 2007


Aaron,
The for loop structure for csh and bash are different and it looks like you
are using the bash syntax in a csh environment.

Either:
1) Switch to bash
2) Google foreach loops in csh and modify your syntax

Hope that helps...

A

+----------------------------------------+
 Aaron Racicot - GIS Programmer   
 360.221.2441 - aaronr at ecotrust.org          
+----------------------------------------+
 e c o t r u s t                        
 pobox 1614
 langley wa 98260
 www.ecotrust.org                       
+----------------------------------------+

-----Original Message-----
From: grassuser-bounces at grass.itc.it [mailto:grassuser-bounces at grass.itc.it]
On Behalf Of goldneaa at onid.orst.edu
Sent: Monday, July 09, 2007 3:43 PM
To: grassuser at grass.itc.it
Subject: [GRASS-user] creating loops in grass

I have been using the directions for creatings loops in GRASS, but  
have not been able to get a correct script.  Below is what i am  
inputing and what I am recieving out
Mapset <PERMANENT> in Location <globe_final>                            
                   GRASS 6.3.cvs > for raster in `g.mlist rast  
pattern="ts_*"` ; do r.info -r $raster done
csh: for: Command not found.
csh: do: Command not found.

I have also tried using the ls function to create a loop and recieved  
the output

Mapset <PERMANENT> in Location <globe_final>                            
                   GRASS 6.3.cvs > for raster in `ls  
/Volumes/ar4/gis/globe_final/PERMANENT/hist/ts_*` ; do r.info $raster  
done
csh: for: Command not found.
csh: do: Command not found.
Any advice for what I can do to fix this problem.
Aaron

_______________________________________________
grassuser mailing list
grassuser at grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser




More information about the grass-user mailing list