[GRASS-user] simple shell problem

Jarosław Jasiewicz jarekj at amu.edu.pl
Mon Mar 3 12:11:06 EST 2008


Manuel Francisco Maestre Páez pisze:
> Because of the "*" you must "escape" the multiplier operator "\*" (without
> the quotes)
>
> Manuel Francisco Maestre Páez
>
>
>
> -----grass-user-bounces at lists.osgeo.org escribió: -----
>
>
> Para: grass-user at lists.osgeo.org
> De: Jaros&#322;aw Jasiewicz <jarekj at amu.edu.pl>
> Enviado por: grass-user-bounces at lists.osgeo.org
> Fecha: 03/03/2008 09:51
> Asunto: [GRASS-user] simple shell problem
>
> Hi
>
> why:
>
> g.region -g | awk -F"=" '/^nsres=/ {print $2 * 1.45}'
>
> works, but:
>
> bufdist=`g.region -g | awk -F"=" '/^nsres=/ {print $2 * 1.45}'`
> or
> bufdist=`eval g.region -g | awk -F"=" '/^nsres=/ {print $2 * 1.45}'`
>
> not work, while, wery similar structure:
>
> n=`g.region -g | awk -F"=" '/^n=/ {print $2+2000}'`
>
> works??
>
> i.e what is wrong in bufdist calculation??
>
> thanks if somebody ansfer
> Jarek
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>   
no!
escape  (  /*  )   is needed in 'expr' command, here is in awk, generaly 
command work but I cannot add the result to variable
J.


More information about the grass-user mailing list