[GRASS-user] v.in.ascii : ERROR: write sidx

Vaclav Petras wenzeslaus at gmail.com
Fri Oct 4 13:09:27 PDT 2013


On Thu, Oct 3, 2013 at 8:44 PM, Nikos Alexandris <nik at nikosalexandris.net>
wrote:
>
> Yann wrote:
>
> > > The command was :
> > > v.in.ascii -z input=${FILE} output=${NAME_OUT} separator="${FS}" z=3
> > > --overwrite
>
> Hamish wrote:
>
> > Hi,
>
> > just to note -- the {curly} brackets do nothing to
> > protect from spaces in filenames in this situation,
> > "double" quotes should be used for that.
> >
> > the curly brackets protect the variable name, not its
> > contents, so are mostly useful for when a letter,
> > number, or "_" follows the variable name.
> >
> > I actually think it is dangerous to use the curly
> > brackets because it tricks people into thinking they
> > are protected when they are not.
>
> Maybe "${FILE}" then?  I remember this as being Glynn's recommendation,
some
> time ago...
>
Yes "${FILE}" should protect spaces and variable name.

$ MY_VARIABLE="GRASS is GIS"
$ for A in $MY_VARIABLE; do echo $A; done;
GRASS
is
GIS
$ for A in "${MY_VARIABLE}"; do echo $A; done;
GRASS is GIS

But if I want to make thinks robust I use Python. Although module call
itself is more complicated

input=file_name

is less complicated than

input="${FILE}"

Best,
Vaclav

>
> Best, Nikos
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20131004/6bb2cd96/attachment.html>


More information about the grass-user mailing list