[GRASSLIST:9790] Re: Bash shell scripting question for batch archiving Grass vectors

Florian Kindl florian.kindl at uibk.ac.at
Wed Jan 11 09:48:11 EST 2006


On 11.01.2006, at 15:27, Patton, Eric wrote:
> I've tried the following bash script, run from
> the PERMANENT directory of my location:
>
> for map in `g.mlist type=vect pattern='Opil??_ship_nav_track'`; do
> tar cvf `basename $map.tar` $map ;
> done
>
> Can anyone see anything obviously wrong?
>

This approach can't work since there are no files with the name of  
$map in PERMANENT.
You need to descend to the folder 'vector'.

I'm not sure, though, if this is a succesful way to move the data  
sets at all.
I think it is better to export the vector data (like v.out.ascii) and  
tar the resulting output.

-flo.




More information about the grass-user mailing list