Re: [GRASS-user] shell script problem

2008-12-30 Thread Markus Neteler
On Thu, Dec 4, 2008 at 6:46 PM, Mario Giacomello
mario.giacome...@googlemail.com wrote:
 Thanks for your prompt response. I have got as far as understanding
 that I should run scripts inside GRASS.So, the answer is yes- I have
 run the script inside GRASS.

best is to add this before the GRASS commands in the
script:

if  [ -z $GISBASE ] ; then
echo You must be in GRASS GIS to run this program. 2
exit 1
fi

then you are sure...

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] shell script problem

2008-12-29 Thread Jachym Cepicky
isn't there any no-linebreak space somewhere?

j

2008/12/4, Otto Dassau otto.das...@gmx.de:
 Hi Mario,


  On Thu, 4 Dec 2008 17:46:36 +
  Mario Giacomello mario.giacome...@googlemail.com wrote:

   Thanks for your prompt response. I have got as far as understanding
   that I should run scripts inside GRASS.So, the answer is yes- I have
   run the script inside GRASS.


 try to start the script with:

  sh grassscript.sh
  or
  ./grassscript.sh (if you made it executable)

  regards,

  Otto


   Marco
  
   On Thu, Dec 4, 2008 at 5:54 PM, ivan marchesini marches...@unipg.it 
 wrote:
hmmm
are you starting the script inside grass?
   
probably not... or I'm wrong?
   
Ivan
   
Il giorno gio, 04/12/2008 alle 17.06 +, Mario Giacomello ha scritto:
Dear all,
   
Apologies for the total beginner's question, but despite my efforts
and searches through the GRASS mailing list archives I have not been
able to solve my problem. I am trying to write a simple grass script
in order to automated a process, but I have not very far yet. One
thing that I would like to do is to be able to change the region, but
GRASS seems to come up with the whenever I , for example, try to use
the following simple lines:
   
#!/bin/sh
   
g.region rast=map1
r.stats -ln map1  file1
   
The message I get is: command not found. What am I doing wrong? Is
this problem related to the setting of environment variables?
   
I am using GRASS 6.3.0  installed on Ubuntu 8.10
   
thanks in advance,
   
Mario Giacomello
  ___
  grass-user mailing list
  grass-user@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/grass-user



-- 
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] shell script problem

2008-12-04 Thread Mario Giacomello
Dear all,

Apologies for the total beginner's question, but despite my efforts
and searches through the GRASS mailing list archives I have not been
able to solve my problem. I am trying to write a simple grass script
in order to automated a process, but I have not very far yet. One
thing that I would like to do is to be able to change the region, but
GRASS seems to come up with the whenever I , for example, try to use
the following simple lines:

#!/bin/sh

g.region rast=map1
r.stats -ln map1  file1

The message I get is: command not found. What am I doing wrong? Is
this problem related to the setting of environment variables?

I am using GRASS 6.3.0  installed on Ubuntu 8.10

thanks in advance,

Mario Giacomello
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] shell script problem

2008-12-04 Thread Mario Giacomello
Thanks for your prompt response. I have got as far as understanding
that I should run scripts inside GRASS.So, the answer is yes- I have
run the script inside GRASS.


Marco

On Thu, Dec 4, 2008 at 5:54 PM, ivan marchesini [EMAIL PROTECTED] wrote:
 hmmm
 are you starting the script inside grass?

 probably not... or I'm wrong?

 Ivan



 Il giorno gio, 04/12/2008 alle 17.06 +, Mario Giacomello ha scritto:
 Dear all,

 Apologies for the total beginner's question, but despite my efforts
 and searches through the GRASS mailing list archives I have not been
 able to solve my problem. I am trying to write a simple grass script
 in order to automated a process, but I have not very far yet. One
 thing that I would like to do is to be able to change the region, but
 GRASS seems to come up with the whenever I , for example, try to use
 the following simple lines:

 #!/bin/sh

 g.region rast=map1
 r.stats -ln map1  file1

 The message I get is: command not found. What am I doing wrong? Is
 this problem related to the setting of environment variables?

 I am using GRASS 6.3.0  installed on Ubuntu 8.10

 thanks in advance,

 Mario Giacomello
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user

 --
 Ti prego di cercare di non inviarmi files .dwg, .doc, .xls, .ppt.
 Preferisco formati liberi.
 Please try to avoid to send me .dwg, .doc, .xls, .ppt files.
 I prefer free formats.
 http://it.wikipedia.org/wiki/Formato_aperto
 http://en.wikipedia.org/wiki/Open_format

 Ivan Marchesini
 Department of Civil and Environmental Engineering
 University of Perugia
 Via G. Duranti 93/a
 06125
 Perugia (Italy)
 Socio fondatore GFOSS Geospatial Free and Open Source Software 
 http://www.gfoss.it
 e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]
 tel: +39(0)755853760
 fax (university): +39(0)755853756
 fax (home): +39(0)5782830887
 jabber: [EMAIL PROTECTED]


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] shell script problem

2008-12-04 Thread Otto Dassau
Hi Mario,

On Thu, 4 Dec 2008 17:46:36 +
Mario Giacomello [EMAIL PROTECTED] wrote:

 Thanks for your prompt response. I have got as far as understanding
 that I should run scripts inside GRASS.So, the answer is yes- I have
 run the script inside GRASS.

try to start the script with:

sh grassscript.sh 
or 
./grassscript.sh (if you made it executable)

regards,
 Otto

 Marco
 
 On Thu, Dec 4, 2008 at 5:54 PM, ivan marchesini [EMAIL PROTECTED] wrote:
  hmmm
  are you starting the script inside grass?
 
  probably not... or I'm wrong?
 
  Ivan
 
  Il giorno gio, 04/12/2008 alle 17.06 +, Mario Giacomello ha scritto:
  Dear all,
 
  Apologies for the total beginner's question, but despite my efforts
  and searches through the GRASS mailing list archives I have not been
  able to solve my problem. I am trying to write a simple grass script
  in order to automated a process, but I have not very far yet. One
  thing that I would like to do is to be able to change the region, but
  GRASS seems to come up with the whenever I , for example, try to use
  the following simple lines:
 
  #!/bin/sh
 
  g.region rast=map1
  r.stats -ln map1  file1
 
  The message I get is: command not found. What am I doing wrong? Is
  this problem related to the setting of environment variables?
 
  I am using GRASS 6.3.0  installed on Ubuntu 8.10
 
  thanks in advance,
 
  Mario Giacomello
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] shell script problem

2008-12-04 Thread ivan marchesini
hmmm 
are you starting the script inside grass?

probably not... or I'm wrong?

Ivan



Il giorno gio, 04/12/2008 alle 17.06 +, Mario Giacomello ha scritto:
 Dear all,
 
 Apologies for the total beginner's question, but despite my efforts
 and searches through the GRASS mailing list archives I have not been
 able to solve my problem. I am trying to write a simple grass script
 in order to automated a process, but I have not very far yet. One
 thing that I would like to do is to be able to change the region, but
 GRASS seems to come up with the whenever I , for example, try to use
 the following simple lines:
 
 #!/bin/sh
 
 g.region rast=map1
 r.stats -ln map1  file1
 
 The message I get is: command not found. What am I doing wrong? Is
 this problem related to the setting of environment variables?
 
 I am using GRASS 6.3.0  installed on Ubuntu 8.10
 
 thanks in advance,
 
 Mario Giacomello
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user
 
-- 
Ti prego di cercare di non inviarmi files .dwg, .doc, .xls, .ppt.
Preferisco formati liberi.
Please try to avoid to send me .dwg, .doc, .xls, .ppt files.
I prefer free formats.
http://it.wikipedia.org/wiki/Formato_aperto
http://en.wikipedia.org/wiki/Open_format

Ivan Marchesini
Department of Civil and Environmental Engineering
University of Perugia
Via G. Duranti 93/a 
06125
Perugia (Italy)
Socio fondatore GFOSS Geospatial Free and Open Source Software 
http://www.gfoss.it
e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]
tel: +39(0)755853760
fax (university): +39(0)755853756
fax (home): +39(0)5782830887
jabber: [EMAIL PROTECTED]

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user