[GRASS-user] bash scripts and NLS

Glynn Clements glynn at gclements.plus.com
Tue Mar 27 16:43:01 EDT 2007


Jarek Jasiewicz wrote:

> ...d.what.vect -1 -t  map=lines|grep category|awk '{print $2}'>>cat.txt...
> 
> I compiled grass with NLS (national languages suports) and script stop 
> working becouse there is no category (grep) but kategoria (category in 
> polish). In my few scripts it is no problem (or rather I will never use 
> NLS), but what about scripts in grass add-ons and nls?

If a script parses output which is meant to be human-readable, it
needs to explicitly set the locale to "C" for that command, e.g.:

	LC_ALL=C d.what.vect -1 -t ...

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list