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

Patton, Eric epatton at nrcan.gc.ca
Wed Jan 11 09:27:16 EST 2006


Hi Guys,

I'm trying to batch archive about 30 vector files from a Location so I can
send them to another colleague. The whole location is too big to send, and
at any rate, he only needs the vectors for his work. I don't want to have to
tar each one individually. 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

tar: Opil184a_ship_nav_track: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
tar: Opil185a_ship_nav_track: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
tar: Opil186a_ship_nav_track: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
tar: Opil186b_ship_nav_track: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
tar: Opil189a_ship_nav_track: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
tar: Opil189b_ship_nav_track: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors

Can anyone see anything obviously wrong?

~ Eric.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Eric Patton
 
Technologist, Geo-Spatial Data Services
Geological Survey of Canada (Atlantic)
Natural Resources Canada
Bedford Institute of Oceanography
Dartmouth, Nova Scotia, Canada B2Y 4A2
 
Postal address: P.O. Box 1006
Courier address: 1 Challenger Drive
 
Telephone: (902)426-7732
Facsimile:  (902)426-4104
E-mail:       epatton at NRCan.gc.ca
 




More information about the grass-user mailing list