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?