0

So reading this GRASS/Shell documentation I decided to test my own for repeat using this lines

CATS="(v.db.select -c map=training columns=cat)" echo $CATS for i in $CATS do where="cat = $CATS" outputname=region_uspo_$CATS regionname=subset_uspo_$CATS

v.extract -o input=training type=area where=$condition output=$outputname done

but I keep getting an error message with v.extract

ERROR: v.extract: Sorry, is not a valid flag ERROR: v.extract: Sorry, is not a valid flag ERROR: v.extract: Sorry, is not a valid parameter ERROR: v.extract: Sorry, is not a valid parameter

now I've also tried this CATS="$(v.db.select -c map=training columns=cat)"

Can anyone help me figure out where I did wrong?

1

Ok so I typed before I was able to think and the actual loop was this:

CATS="$(v.db.select -c map=training columns=cat)" echo $CATS for i in $CATS do echo $i where="cat=$i" v.extract --overwrite input=training@user type=area where=$where output=region_uspo_$i done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.