[GRASS5] spaces in file names

Glynn Clements glynn at gclements.plus.com
Fri Oct 22 15:31:44 EDT 2004


Maciek Sieczka wrote:

> When I tried to deal with the spaces in a file name by replacing them with
> "\ " I got an error:
> 
>     GRASS:~ > v.in.shape -d input=~/esri_vect_utm/B_Major\ Cities\ 2.shp
> output=miasta
>     WARNING: Log file not specified. Sending messages to 'standard error'
>     ERROR: ~/esri_vect_utm/B_Major Cities 2.shp - DBF not found, or wrong
>        format.
> 
> The "B_Major Cities 2.dbf" was there in the same directory as the "B_Major
> Cities 2.shp". After removing spaces in corresponding files all was ok.
> 
> Could I handle the spaces some other way or is renaming files the only
> solution?

The shell doesn't expand the tilde in that context; use $HOME instead,
i.e.:

	v.in.shape -d input=$HOME/esri_vect_utm/B_Major\ Cities\ 2.shp

FWIW, ash and zsh don't expand the tilde even when the filename
doesn't contain spaces.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list