[GRASS5] 5.0.2 trashes .grassrc5

Glynn Clements glynn.clements at virgin.net
Sun Mar 9 00:19:47 EST 2003


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.

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




More information about the grass-dev mailing list