[GRASS5] 5.0.2 trashes .grassrc5

Markus Neteler neteler at itc.it
Sun Mar 9 11:56:09 EST 2003


On Sun, Mar 09, 2003 at 05:19:47AM +0000, Glynn Clements wrote:
> 
> Chris Heg wrote:
> 
> > I have a recurring error on Grass 5.0.2. Starting with no .grassrc5:
> 
> > awk: illegal field $()
> >  input record number 1, file /export/home/cheg/.grassrc5
> >  source line number 1
> 
> That error is due to this change:
> 
> 	revision 1.43
> 	date: 2003/02/27 17:44:53;  author: markus;  state: Exp;  lines: +19 -9
> 	further changes for white space support
> 
> -    awk '$1 !~ /GRASS_GUI/ {print}' "$GISRC" > "$GISRC.$$"
> +    awk '$ARGS !~ /GRASS_GUI/ {print}' "$GISRC" > "$GISRC.$$"
> 
> -                        awk '$1 !~ /GRASS_GUI/ {print}' "$GISRC" > "$GISRC.$$"
> +                        awk '$ARGS !~ /GRASS_GUI/ {print}' "$GISRC" > "$GISRC.$$"
> 
> I don't understand exactly what was intended in the general case
> (changing $1 to $ARGS), but it's clear that this specific case is
> wrong: in the "awk" commands, "$1" is an awk variable, not a shell
> variable, so it shouldn't have been changed.
> 
> I'll fix the specific awk problem myself.
> 
> Regarding the more general changes, I'd appreciate it if Markus could
> provide some insight into the motivation behind changing $1 to $ARGS.

AFAIK this change should not affect 5.0.2 as it was done in HEAD only.

$ARGS is set in line 49. Probably I have chosen a reserved word?
So far it worked for me/us on Linux.
The underlying idea is white space support as the CVS comment states.
In case of white space the calling script which starts GRASS is
sending several parameters to Init.sh, that's why $ARGS is constructed
in line 49.

Markus




More information about the grass-dev mailing list