Newsgroups: info.grass.user,info.grass.programmer
Path: copeland
From: copeland@lamar.ColoState.EDU (Jeffrey Copeland)
Subject: EMERGENCY: shell scripts
Sender: news@yuma.ACNS.ColoState.EDU (News Account)
Message-ID: <Dec01.164345.32594@yuma.ACNS.ColoState.EDU>
Date: Wed, 01 Dec 1993 16:43:45 GMT
Nntp-Posting-Host: lamar.acns.colostate.edu
Organization: Colorado State University
Lines: 42
I cant get a shell script to work. This one is supposed to execute
r.in.ascii for several hundred files
#!/bin/sh
for FILENAME in 'ls /u1/copeland/rams3a/van/*00'
do
r.in.ascii input=/u1/copeland/rams3a/van/$FILENAME output=$FILENAME
done
when executed I get the following error message
_____________________________
Sorry </u1/copeland/rams3a/van/PTOTAL-07-15-00> is not a valid option
Usage:
r.in.ascii input=name output=name [title="phrase"] [mult=value]
Parameters:
input Ascii raster file to be imported
output Name for resultant raster map
title Title for resultant raster map
mult Multiplier for ascii data
default: 1.0
___________________________________
the sorry line appears twice for each file
when I dont have the for loop and instead have FILENAME=PTOTAL-07-15-00
it works just fine. Ive used a similar for loop construct in non GRASS
scripts before
-------------------------------------------------------------------------------
Jeffrey Copeland | We're wanted men,
Colorado State University | We'll strike again,
Atmospheric Science | But first let's have a beer!
303-491-8502 |
copeland@homebrew.atmos.colostate.edu | J.Buffet, Great Filling Station Holdup
-------------------------------------------------------------------------------